Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It provides safe and convenient access to these libraries using the ElementTree API.
It extends the ElementTree API significantly to offer support for XPath, RelaxNG, XML Schema, XSLT, C14N and much more.
In case you want to use the current in-development version of lxml, you can get it from the subversion repository at http://codespeak.net/svn/lxml/trunk . Running easy_install lxml==dev will install it from http://codespeak.net/svn/lxml/trunk#egg=lxml-dev
- Support strings and instantiable Element classes as child arguments to the constructor of custom Element classes.
- GZip compression support for serialisation to files and file-like objects.
- Deep-copying an ElementTree copied neither its sibling PIs and comments nor its internal/external DTD subsets.
- Soupparser failed on broken attributes without values.
- Crash in XSLT when overwriting an already defined attribute using xsl:attribute.
- Crash bug in exception handling code under Python 3. This was due to a problem in Cython, not lxml itself.
- lxml.html.FormElement._name() failed for non top-level forms.
- TAG special attribute in constructor of custom Element classes was evaluated incorrectly.
- Official support for Python 3.0.1.
- Element.findtext() now returns an empty string instead of None for Elements without text content.