Skip to main content

Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.

Project description

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.

To contact the project, go to the project home page or see our bug tracker at https://launchpad.net/lxml

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

2.2beta4 (2009-02-27)

Features added

  • 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.

Bugs fixed

  • 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.

Other changes

  • Official support for Python 3.0.1.
  • Element.findtext() now returns an empty string instead of None for Elements without text content.

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
lxml-2.2beta4.tar.gz (2.9 MB) Copy SHA256 hash SHA256 Source None Feb 27, 2009

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page