Module etree
ElementTree API selection.
The rest of PyXMPP2 package imports the ElementTree API from this module.
The actual API can be selected in one of two ways:
By importing this module (before anything else) its ElementTree
variable:
import pyxmpp2.etree
import xml.etree.cElementTree
pyxmpp2.etree.ElementTree = xml.etree.cElementTree
Or by setting the 'PYXMPP2_ETREE' environment variable, e.g.:
$ PYXMPP2_ETREE="xml.etree"
By default the standard Python ElementTree implementation is used
(xml.etree.ElementTree)
element_to_unicode(element)
|
|
Serialize an XML element into a unicode string.
This should work the same on Python2 and Python3 and with all
ElementTree implementations.
- Parameters:
|