libxml2dom

The libxml2dom package provides a traditional DOM wrapper around the Python bindings for libxml2. In contrast to the libxml2 bindings, libxml2dom provides an API reminiscent of minidom, pxdom and other Python-based and Python-related XML toolkits. Performance is disappointing, given the typical high speed of libxml2 processing, but this is to be expected since large numbers of Python objects are instantiated at two levels of document tree representation. However, serialisation of documents is much faster than many other toolkits because it can make direct use of libxml2.

Copyright and Licence

For reasons of consistency, libxml2dom uses the same MIT-style licence as libxml2. See the file COPYING.txt in the docs directory within the source code distribution.

Installation

Given the availability of libxml2, libxml2dom only needs to reside on the PYTHONPATH and can be installed using the setup.py script provided:

python setup.py install

Dependencies and Installation Issues

The following descriptions identify dependencies and describe appropriate installation issues with each dependency:

libxml2 2.6.16

Building libxml2 from source and configuring the Python bindings can be done as follows:

cd libxml2-2.6.16
./configure --with-python=/usr/local/bin/python
make

If you are to use an installation of Python installed outside /usr/local then specify the "prefix" accordingly. Install (possibly as root) in the usual way:

make install

Previous releases of libxml2 in the 2.6 series may work, but some bugs were observed with the previously recommended 2.6.0 and these may not have been fixed until 2.6.16 or slightly earlier.

Issues

The patches directory in the source code distribution contains a patch against libxml2 2.5.7 which resolves an issue exposed by libxml2dom. Although it is recommended that later releases of libxml2 are used instead, the source code distribution of libxml2 2.5.7 can be patched as follows:

patch -p0 < libxml2dom/patches/libxml2/libxml.c.diff

The command should be run outside/above the libxml2-2.5.7 directory, and the stated path should be adjusted accordingly.

Python 2.2

Python releases from 2.2 onwards should be compatible with libxml2dom. The principal requirement from such releases is the new-style class support which permits the use of properties in the libxml2dom implementation, thus simplifying the code somewhat.

Changelog

New in libxml2dom 0.1.3 (Changes since libxml2dom 0.1.2)

New in libxml2dom 0.1.2 (Changes since libxml2dom 0.1.1)

New in libxml2dom 0.1.1 (Changes since libxml2dom 0.1)