XML.to_string

XML.to_string(encoding='utf-8')[source]

Generate a string representation of this XML instance, including all sub-elements.

Parameters

encoding (str, optional) – Output encoding (the default is ‘utf-8’)

Returns

str – String representation of the XML.