On Tue, Dec 1, 2009 at 4:03 AM, Thomas Lionel Smets <tsm...@gmail.com> wrote:
> Dear,
>
> 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 [1].  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
library.

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 [2] and Amara [3].  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.

[1] <http://codespeak.net/lxml/>
[2] <http://4suite.org/index.xhtml>
[3] <http://www.xml3k.org/Amara>

Chuck

>
> Tx,
>
> \T,
>
> --
> Thomas SMETS
> rue J. Wytsmanstraat 62
> 1050 Brussels
> m. : +32 497 44 68 12
> _______________________________________________
> XML-SIG maillist  -  xml-...@python.org
> http://mail.python.org/mailman/listinfo/xml-sig
>
_______________________________________________
XML-SIG maillist  -  XML-SIG@python.org
http://mail.python.org/mailman/listinfo/xml-sig

Reply via email to