skip to navigation
skip to content

lxml 1.0

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

Latest Version: 2.2.4

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.0 (2006-06-01)

Features added

See also the features added for lxml 1.0beta to find out more about what's new.

  • Element.getiterator() and the findall() methods support finding arbitrary elements from a namespace (pattern {namespace}*)
  • Another speedup in tree iteration code
  • General speedup of Python Element object creation and deallocation
  • Writing C14N no longer serializes in memory (reduced memory footprint)
  • PyErrorLog for error logging through the Python logging module
  • element.getroottree() returns an ElementTree for the root node of the document that contains the element.
  • ElementTree.getpath(element) returns a simple, absolute XPath expression to find the element in the tree structure
  • Error logs have a last_error attribute for convenience
  • Comment texts can be changed through the API

Bugs fixed

  • Memory leak in Element.__setitem__
  • Memory leak in Element.attrib.items() and Element.attrib.values()
  • Memory leak in XPath extension functions
  • Memory leak in unicode related setup code
  • Element now raises ValueError on empty tag names
  • Namespace fixing after moving elements between documents could fail if the source document was freed too early
  • Setting namespace-less tag names on namespaced elements ('{ns}t' -> 't') didn't reset the namespace
  • Unknown constants from newer libxml2 versions could raise exceptions in the error handlers
  • lxml.etree compiles much faster
  • On libxml2 <= 2.6.22, parsing strings with encoding declaration could fail in certain cases
  • Document reference in ElementTree objects was not updated when the root element was moved to a different document
  • Running absolute XPath expressions on an Element now evaluates against the root tree
  • Evaluating absolute XPath expressions (/*) on an ElementTree could fail
  • Crashes when calling XSLT, RelaxNG, etc. with uninitialized ElementTree objects
  • Memory leak when using iconv encoders in tostring/write
  • Deep copying Elements and ElementTrees maintains the document information
  • Serialization functions raise LookupError for unknown encodings
  • Memory deallocation crash resulting from deep copying elements
File Type Py Version Uploaded on Size # downloads
lxml-1.0-py2.3-linux-i686.egg (md5)
built on Linux-2.6.12-10-686-i686-with-glibc2.3
Python Egg 2.3 2006-06-01 18:13:33 158KB 481
lxml-1.0-py2.4-freebsd-6.1-RELEASE-i386.egg (md5)
contributed by Steve Howe
Python Egg 2.4 2006-06-02 10:12:21 169KB 497
lxml-1.0-py2.4-linux-i686.egg (md5)
built on Linux-2.6.12-10-686-i686-with-glibc2.3
Python Egg 2.4 2006-06-01 18:10:50 158KB 550
lxml-1.0-py2.4-linux-x86_64.egg (md5, pgp)
built on Linux-2.6.16.16-20060519111355-x86_64-with-glibc2.2.5
Python Egg 2.4 2006-06-01 18:03:38 163KB 517
lxml-1.0-py2.4-macosx-10.4-ppc.egg (md5)
contributed by Georges Racinet
Python Egg 2.4 2006-06-02 11:37:34 338KB 542
lxml-1.0-py2.4-win32.egg (md5)
contributed by Steve Howe
Python Egg 2.4 2006-06-02 10:11:30 143KB 535
lxml-1.0-static.win32-py2.4.exe (md5)
contributed by Steve Howe, libxml2/libxslt statically built into lxml.etree
MS Windows installer 2.4 2006-06-04 06:19:45 1MB 177
lxml-1.0.tar.gz (md5, pgp) Source 2006-06-01 18:03:28 356KB 306
lxml-1.0.win32-py2.4.exe (md5)
contributed by Steve Howe
MS Windows installer 2.4 2006-06-02 10:15:52 202KB 191

Log in to rate this package.