Skip to main content

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

Project description

lxml is a Pythonic 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.

1.1beta (2006-08-08)

Features added

  • Support for Python 2.5 beta
  • Unlock the GIL for deep copying documents and for XPath()
  • New compact keyword argument for parsing read-only documents
  • Support for parser options in iterparse()
  • The namespace axis is supported in XPath and returns (prefix, URI) tuples
  • The XPath expression “/” now returns an empty list instead of raising an exception
  • XML-Object API on top of lxml (lxml.objectify)
  • Customizable Element class lookup:
    • different pre-implemented lookup mechanisms
    • support for externally provided lookup functions
  • Support for processing instructions (ET-like, not compatible)
  • Public C-level API for independent extension modules

Bugs fixed

  • XPathSyntaxError now inherits from XPathError
  • Threading race conditions in RelaxNG and XMLSchema
  • Crash when mixing elements from XSLT results into other trees, concurrent XSLT is only allowed when the stylesheet was parsed in the main thread
  • The EXSLT regexp:match function now works as defined (except for some differences in the regular expression syntax)
  • Setting element.text to ‘’ returned None on request, not the empty string
  • iterparse() could crash on long XML files
  • Creating documents no longer copies the parser for later URL resolving. For performance reasons, only a reference is kept. Resolver updates on the parser will now be reflected by documents that were parsed before the change. Although this should rarely become visible, it is a behavioral change from 1.0.

Project details

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-1.1beta-py2.4-linux-i686.egg (242.7 kB) Copy SHA256 hash SHA256 Egg 2.4
lxml-1.1beta-py2.4-linux-x86_64.egg (260.9 kB) Copy SHA256 hash SHA256 Egg 2.4
lxml-1.1beta.tar.gz (457.5 kB) Copy SHA256 hash SHA256 Source None

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 SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page