
jython-elementtree
ElementTree is a Python library for XML processing. Considered as best-of-breed, its core modules have been added to the CPython 2.5 standard library. Jython development efforts currently target a 2.5 version that would match CPython 2.5 language features and libraries. This project provides a port of ElementTree for this release of Jython.
News
18 may 2009. Need for speed ? Jython ElementTree 0.4 was embarrassingly slow with respect to its CPython counterpart. Jython ElementTree 0.5, included in Jython 2.5 RC2, solves this issue (release).
13 january 2009. Happy New Year ! Jython 2.5 beta 1 was released 4 days ago and includes jython-elementtree (release).
27 december 2008. 100% ElementTree 1.2.6 tests pass in effbot test suite (release).
Implementation
The project currently emulates partially the API of the expat parser that is used in the CPython ElementTree.
This strategy allows the support of multiple versions of ElementTree without any change to their sources. The main target versions are: * 1.2.6, the version that ships with CPython 2.5, 2.6 and 3.0, * 1.3, the bleeding edge, currently in alpha.
Jython-elementtree fares well against standard ElementTree test suites : 1 failure out of 395 tests.
Installation
Update. The ElementTree library is now a standard component of Jython. No extra step is required beyond the installation of Jython 2.5 (beta) itself to get ElementTree 2.6. The installation instructions for ElementTree 1.3 (alpha 3) are still valid.
(OBSOLETE) To install ElementTree 1.2.6 for Jython as a standard library, type:
$ svn checkout http://jython-elementtree.googlecode.com/svn/trunk elementtree
$ cd elementtree
$ jython setup.py install --stdlib
Optionally, to install ElementTree 1.3, as a third-party library, type:
$ svn checkout http://svn.effbot.org/public/elementtree-1.3 elementtree-1.3
$ cd elementtree-1.3
$ jython setup.py install
Usage
To use ElementTree 1.2.6, type in the Jython console: ```
from xml.etree import ElementTree
or to use the 1.3 version:
from elementtree import ElementTree ```
Project Information
- License: MIT License
- 2 stars
- svn-based source control
Labels:
XML
Jython
ElementTree