Package pyxmpp2 :: Module etree
[hide private]

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)

Classes [hide private]
  ElementClass
Abstract class used to reference the ElementTree.Element object type of the selected Element Tree implementation.
Functions [hide private]
 
element_to_unicode(element)
Serialize an XML element into a unicode string.
Function Details [hide private]

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: