Parsing XML/XSLT

Discussion in 'Python' started by veracon, Apr 23, 2006.

  1. veracon

    veracon Guest

    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?
     
    veracon, Apr 23, 2006
    #1
    1. Advertising

  2. veracon

    Paul Boddie Guest

    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/
     
    Paul Boddie, Apr 23, 2006
    #2
    1. Advertising

  3. 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
     
    Stefan Behnel, Apr 25, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    714
    Stylus Studio
    Aug 3, 2004
  2. Replies:
    4
    Views:
    691
  3. jkflens
    Replies:
    2
    Views:
    1,514
    jkflens
    May 30, 2006
  4. PL
    Replies:
    2
    Views:
    235
    Brian McCauley
    Dec 14, 2004
  5. Erik Wasser
    Replies:
    5
    Views:
    483
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page