[XML-SIG] Python XML
cfbearden at gmail.com
Tue Dec 1 15:57:14 CET 2009
On Tue, Dec 1, 2009 at 4:03 AM, Thomas Lionel Smets <tsmets at gmail.com> wrote:
> To process XML from Python ...
> What is the best library ?
> http://pyxml.sourceforge.net/topics/books.html is officially not
> supported / maintained anymore
> There is the libxml2 but there are not much response on google (at first sight).
> Any relevant pointers would be appreciated :)
Much depends on how you want to process the XML. If you want a
Pythonic API that treats an XML instance like a tree, then use
ElementTree, which is available in the standard library but is also
implemented in the lxml package . The standard library also
includes serviceable SAX and DOM implementations. If you want simple,
fast, event-driven parsing, try the expat module in the standard
If you want to use XPath and XSLT 1.0, or if you want to validate
against DTDs or RNG schemata, install the excellent lxml package,
which uses libxml2 and libxslt under the hood for much of what it
does. It also has good tools for working with HTML. lxml has become
my own toolset of choice for working with XML in Python, partly
because I love XSLT.
There are other tools that I haven't gotten around to trying yet, such
as 4Suite  and Amara . Perhaps others can say something about
them, but you should also search the archives of this list to learn
more about them on your own.
> Thomas SMETS
> rue J. Wytsmanstraat 62
> 1050 Brussels
> m. : +32 497 44 68 12
> XML-SIG maillist - XML-SIG at python.org
More information about the XML-SIG