Differences between revisions 13 and 14
Revision 13 as of 2008-01-24 13:42:24
Size: 2743
Editor: PaulBoddie
Comment: Added pulldom and itools references.
Revision 14 as of 2008-02-12 17:28:28
Size: 3797
Editor: 194
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
== Parsers == The standard library has a number of tools available, which fall into mainly three categories:
Line 7: Line 7:
In the standard library:  * XML tree libraries that adhere to the W3C DOM standard:
   * MiniDom - the xml.dom.minidom package
   * PullDom - the xml.dom.pulldom package
 * an event-driven XML parser compatible with the W3C SAX standard:
   * ["Sax"] - the xml.sax package
 * a pythonesque XML tree library:
   * ElementTree - the xml.etree package (new in Python 2.5)
Line 9: Line 15:
 * ElementTree - the xml.etree package (new in Python 2.5)
 * MiniDom - the xml.dom.minidom package
 * PullDom - the xml.dom.pulldom package
 * ["Sax"] - the xml.sax package
The DOM and SAX packages have the advantage of being compatible to W3C standard APIs, so users who are already familiar with these APIs can use them without learning too many new things. Everyone else should start with the more pythonic ElementTree library, which is very well integrated into the Python language, and therefore very easy to learn and use.
Line 14: Line 17:
Available separately: == External packages ==

A long list of special purpose and general purpose Python XML packages is available from [http://pypi.python.org/pypi?:action=browse&show=all&c=500 PyPI]. The following is a choice of major tools that support a broader set of XML features.

=== Pythonic tools ===

 * [http://uche.ogbuji.net/tech/4suite/amara/manual Amara] - Amara provides tools you can trust to conform with XML standards without losing the familiar Python feel
 * [http://codespeak.net/lxml/ lxml] - a pythonic, ElementTree-compatible binding for the libxml2 and libxslt libraries that comes with all sorts of powerful XML tools, well integrated into an easy-to-use Python API
 * [http://codespeak.net/lxml/objectify.html lxml.objectify] - a Python object API for XML based on lxml

=== W3C DOM-like libraries ===
Line 17: Line 30:
 * [http://uche.ogbuji.net/tech/4suite/amara/manual Amara] - Amara provides tools you can trust to conform with XML standards without losing the familiar Python feel
Line 20: Line 32:
 * [http://codespeak.net/lxml/ lxml] - a "Pythonic" binding for the libxml2 and libxslt libraries that comes with all sorts of powerful XML tools, all integrated into an easy-to-use API
* [http://pyxml.sourceforge.net/ PyXML] - the semi-official Python distribution for XML, now without a maintainer
 * [http://pyxml.sourceforge.net/ PyXML] - the semi-official Python distribution for XML, now without a maintainer!
Line 24: Line 35:
== XSLT == === XSLT Support ===
Line 26: Line 37:
 * [http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt XSLT tools for Python] - a collection of examples and links by Uche Ogbuji  * [http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt XSLT tools for Python] - an (older) collection of examples and links by Uche Ogbuji
 * [http://codespeak.net/lxml lxml] has excellent support for XSLT that is based on libxslt
Line 28: Line 40:
 * [http://codespeak.net/lxml lxml] has excellent support for XSLT that is based on libxslt
Line 31: Line 42:
== XML-based Communications == === XML-based Communications ===
Line 37: Line 48:
== Web Services == === Web Services ===

Python and XML

A variety of XML processing solutions are available for Python. This page attempts, at the very least, to list the most actively developed or most easily available.

The standard library has a number of tools available, which fall into mainly three categories:

  • XML tree libraries that adhere to the W3C DOM standard:
    • MiniDom - the xml.dom.minidom package

    • PullDom - the xml.dom.pulldom package

  • an event-driven XML parser compatible with the W3C SAX standard:
    • ["Sax"] - the xml.sax package
  • a pythonesque XML tree library:
    • ElementTree - the xml.etree package (new in Python 2.5)

The DOM and SAX packages have the advantage of being compatible to W3C standard APIs, so users who are already familiar with these APIs can use them without learning too many new things. Everyone else should start with the more pythonic ElementTree library, which is very well integrated into the Python language, and therefore very easy to learn and use.

External packages

A long list of special purpose and general purpose Python XML packages is available from [http://pypi.python.org/pypi?:action=browse&show=all&c=500 PyPI]. The following is a choice of major tools that support a broader set of XML features.

Pythonic tools

W3C DOM-like libraries

XSLT Support

XML-based Communications

Web Services

Books and Articles

  • XmlBooks

  • ["Tutorials on XML processing with Python"]

SIG

Editorial Notes

The above lists should be arranged in ascending alphabetical order - please respect this when adding new entries. When specifying release dates please use the format YYYY-MM-DD.

PythonXml (last edited 2012-01-11 01:11:25 by c-66-41-60-82)

Unable to edit the page? See the FrontPage for instructions.