Questions about parsing XML

Jarek Zgoda jzgoda at gazeta.usun.pl
Sat Aug 7 10:24:40 EDT 2004


Kyle Root <kyleroot at gmail.com> pisze:

>> libxml2 (http://www.xmlsoft.org/) has excellent support for XPath, F.
>> Lundh's ElementTree also supports some XPath expressions, although it is
>> built on expat and needs to parse whole XML document.
> 
> Well I was going to use that, but I remember reading somewhere that 
> xmlib was depreciated or something, even if it has been do you still 
> recommend libxml2 over expat?

Python's xmllib (regular expression based parser) is not the same
software as libxml2 (GNOME XML library) ;).

If you need full support for XPath, XPointer, XInclude or namespaces
(see http://www.xml.com/pub/a/2004/06/30/py-xml.html) I recommend using
libxml2. Some people say that some of its parsers are also faster than
original J. Clark's expat (although not as easy to use as expat or
expat-like SAX parser from libxml2).

-- 
Jarek Zgoda
http://jpa.berlios.de/



More information about the Python-list mailing list