[lxml-dev] lxml 2.0alpha2 released
Stefan Behnel
stefan_ml at behnel.de
Sun Sep 16 00:37:06 CEST 2007
Hi all,
I just released lxml 2.0alpha2 to PyPI.
http://pypi.python.org/pypi/lxml/2.0alpha2
http://codespeak.net/lxml/dev/
It features a number of major API additions that follow the ElementTree
library and the future API changes in ElementTree 1.3. The main new features
are HTML serialisation support, a feed interface to the parsers, a SAX-like
target parser interface, and iterfind() as an iterator version of findall().
All of these are currently more or less experimental, so feedback is warmly
welcome. The mailing list is always open for discussion, not only on the new
features. The complete changelog is below.
Have fun
Stefan
2.0alpha2 (2007-09-15)
Features added
* ET.write(), tostring() and tounicode() now accept a keyword argument
"method" that can be one of 'xml' (or None), 'html' or 'text' to
serialise as XML, HTML or plain text content.
* iterfind() method on Elements returns an iterator equivalent to
findall()
* itertext() method on Elements
* Setting a QName object as value of the .text property or as an
attribute will resolve its prefix in the respective context
* ElementTree-like parser target interface as described in
http://effbot.org/elementtree/elementtree-xmlparser.htm
* ElementTree-like feed parser interface on XMLParser and HTMLParser
(feed() and close() methods)
Bugs fixed
* lxml failed to serialise namespace declarations of elements other than
the root node of a tree
* Race condition in XSLT where the resolver context leaked between
concurrent XSLT calls
Other changes
* element.getiterator() returns a list, use element.iter() to retrieve
an iterator (ElementTree 1.3 compatible behaviour)
More information about the lxml-dev
mailing list