Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Parsing XML/XSLT

Reply
Thread Tools

Parsing XML/XSLT

 
 
veracon
Guest
Posts: n/a
 
      04-23-2006
Hello,

I'm looking to use XML and XSLT for templates in a system I'm writing,
however I'm not really sure which parser is the "best". Basically,
which library has the most features, and which is the most supported?

A guide I saw mentioned importing xml.xslt, however it appears the xml
module/package contains pretty much nothing - xml.xslt outputs an
exception, No module named xslt.

Help?

 
Reply With Quote
 
 
 
 
Paul Boddie
Guest
Posts: n/a
 
      04-23-2006
veracon wrote:
>
> I'm looking to use XML and XSLT for templates in a system I'm writing,
> however I'm not really sure which parser is the "best". Basically,
> which library has the most features, and which is the most supported?


I use (my own) libxml2dom [1] and XSLTools [2] to respectively parse
XML documents and perform XSL transformations on those documents, both
solutions employing the widely deployed libxml2 [3] and libxslt [4]
libraries. Alternatively, lxml [5] provides parsing and transformation
APIs based on the same underlying technologies.

> A guide I saw mentioned importing xml.xslt, however it appears the xml
> module/package contains pretty much nothing - xml.xslt outputs an
> exception, No module named xslt.


You could inquire on the XML-SIG mailing list [6] about the status of
XSLT in PyXML or in 4Suite, one or both of which being the origin of
the xml.xslt package.

Paul

[1] http://www.python.org/pypi/libxml2dom
[2] http://www.python.org/pypi/XSLTools
[3] http://www.xmlsoft.org/
[4] http://xmlsoft.org/XSLT/
[5] http://codespeak.net/lxml/
[6] http://mail.python.org/mailman/listinfo/xml-sig/

 
Reply With Quote
 
 
 
 
Stefan Behnel
Guest
Posts: n/a
 
      04-25-2006
veracon wrote:
> I'm looking to use XML and XSLT for templates in a system I'm writing,
> however I'm not really sure which parser is the "best". Basically,
> which library has the most features, and which is the most supported?


lxml arguably has the most features by now, as it is based on libxml2 and
libxslt (libexslt support is in SVN) and wraps most of their features into
easy-to-use Python APIs.

At least lxml's API is also arguably the most supported as it mostly
compatible to ElementTree (which made it into Python 2.5).

http://codespeak.net/lxml

Beware though, I'm somewhat biased as I'm one of the authors.

Stefan
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What libraries should I use for MIME parsing, XML parsing, and MySQL ? John Levine Ruby 0 02-02-2012 11:15 PM
[ANN] Parsing Tutorial and YARD 1.0: A C++ Parsing Framework Christopher Diggins C++ 0 07-09-2007 09:01 PM
[ANN] Parsing Tutorial and YARD 1.0: A C++ Parsing Framework Christopher Diggins C++ 0 07-09-2007 08:58 PM
SAX Parsing - Weird results when parsing content between tags. Naren XML 0 05-11-2004 07:25 PM
Perl expression for parsing CSV (ignoring parsing commas when in double quotes) GIMME Perl 2 02-11-2004 05:40 PM



Advertisments