Previous topic

libearth.compat — Compatibility layer

Next topic

libearth.xml.compat.clrxmlreader — XML parser implementation for CLR

This Page

libearth.compat.etree — ElementTree compatibility layer

This proxy module offers a compatibility layer between several ElementTree implementations.

It provides the following two functions:

libearth.compat.etree.fromstring(string)

Parse the given XML string.

Parameters:string (str, bytes, basestring) – xml string to parse
Returns:the element tree object
libearth.compat.etree.fromstringlist(iterable)

Parse the given chunks of XML string.

Parameters:iterable (collections.Iterable) – chunks of xml string to parse
Returns:the element tree object
libearth.compat.etree.tostring(tree)

Generate an XML string from the given element tree.

Parameters:tree – an element tree object to serialize
Returns:an xml string
Return type:str, bytes
Fork me on GitHub