sarkit.xmlhelp.ElementWrapper.add

ElementWrapper.add(localname, val=None)

Add a new subelement and optionally set its value.

Useful for adding a repeatable subelement to work around the tuple from __getitem__.

Parameters:
localnamestr

Local name of element to add

val

Value to set new subelement to.

Returns:
Any

the new transcoded or wrapped subelement