Quantcast

Python XML

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python XML

tsmets
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 :)

Tx,

\T,

--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels
m. : +32 497 44 68 12
_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python XML

Chuck Bearden
On Tue, Dec 1, 2009 at 4:03 AM, Thomas Lionel Smets <[hidden email]> 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  -  [hidden email]
> http://mail.python.org/mailman/listinfo/xml-sig
>
_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python XML

John W. Shipman
In reply to this post by tsmets
+--
| 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 :)
+--

We have an official publication, freely available as a Web
page or PDF, on my favorite package, lxml:

     http://www.nmt.edu/tcc/help/pubs/pylxml/

It's fast, easy to use, and suitable for reading, writing
or updating XML content.  It does not address installation;
it is a user-level publication.

Best regards,
John Shipman ([hidden email]), Applications Specialist, NM Tech Computer Center,
Speare 119, Socorro, NM 87801, (505) 835-5950, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Loading...