paulb@21 | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
paulb@21 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
paulb@21 | 3 | <head> |
paulb@21 | 4 | <title>XMLTools2</title> |
paulb@21 | 5 | <meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" /> |
paulb@21 | 6 | <link href="styles.css" rel="stylesheet" type="text/css" /> |
paulb@21 | 7 | </head> |
paulb@21 | 8 | |
paulb@21 | 9 | <body> |
paulb@21 | 10 | <h1>libxml2dom</h1> |
paulb@21 | 11 | |
paulb@21 | 12 | <p>The libxml2dom package provides a traditional DOM wrapper around the |
paulb@21 | 13 | Python bindings for libxml2. In contrast to the libxml2 bindings, libxml2dom |
paulb@21 | 14 | provides an API reminiscent of minidom, pxdom and other Python-based and |
paulb@21 | 15 | Python-related XML toolkits. Performance is disappointing, given the typical |
paulb@21 | 16 | high speed of libxml2 processing, but this is to be expected since large |
paulb@21 | 17 | numbers of Python objects are instantiated at two levels of document tree |
paulb@21 | 18 | representation. However, serialisation of documents is much faster than many |
paulb@21 | 19 | other toolkits because it can make direct use of libxml2.</p> |
paulb@21 | 20 | |
paulb@21 | 21 | <h2>Copyright and Licence</h2> |
paulb@21 | 22 | |
paulb@21 | 23 | <p>For reasons of consistency, libxml2dom uses the same MIT-style licence as |
paulb@21 | 24 | libxml2. See the file <code>COPYING.txt</code> in the <code>docs</code> |
paulb@21 | 25 | directory within the source code distribution.</p> |
paulb@21 | 26 | |
paulb@21 | 27 | <h2>Dependencies and Installation Issues</h2> |
paulb@21 | 28 | |
paulb@21 | 29 | <p>The following descriptions identify dependencies and describe appropriate |
paulb@21 | 30 | installation issues with each dependency:</p> |
paulb@21 | 31 | |
paulb@21 | 32 | <h3>libxml2 2.6.0</h3> |
paulb@21 | 33 | |
paulb@21 | 34 | <p>Building libxml2 from source and configuring the Python bindings can be |
paulb@21 | 35 | done as follows:</p> |
paulb@21 | 36 | <pre>cd libxml2-2.6.0 |
paulb@21 | 37 | ./configure --with-python=/usr/local/bin/python |
paulb@21 | 38 | make</pre> |
paulb@21 | 39 | |
paulb@21 | 40 | <p>If you are to use an installation of Python installed outside |
paulb@21 | 41 | <code>/usr/local</code> then specify the "prefix" accordingly. Install |
paulb@21 | 42 | (possibly as <code>root</code>) in the usual way:</p> |
paulb@21 | 43 | <pre>make install</pre> |
paulb@21 | 44 | |
paulb@21 | 45 | <h4>Issues</h4> |
paulb@21 | 46 | |
paulb@21 | 47 | <p>The <code>patches</code> directory in the source code distribution |
paulb@21 | 48 | contains a patch against libxml2 2.5.7 which resolves an issue exposed by |
paulb@21 | 49 | libxml2dom. Although it is recommended that later releases of libxml2 are |
paulb@21 | 50 | used instead, the source code distribution of libxml2 2.5.7 can be patched as |
paulb@21 | 51 | follows:</p> |
paulb@21 | 52 | <pre>patch -p0 < libxml2dom/patches/libxml2/libxml.c.diff</pre> |
paulb@21 | 53 | |
paulb@21 | 54 | <p>The command should be run outside/above the <code>libxml2-2.5.7</code> |
paulb@21 | 55 | directory, and the stated path should be adjusted accordingly.</p> |
paulb@21 | 56 | |
paulb@21 | 57 | <h3>Python 2.2</h3> |
paulb@21 | 58 | |
paulb@21 | 59 | <p>Python releases from 2.2 onwards should be compatible with libxml2dom. The |
paulb@21 | 60 | principal requirement from such releases is the new-style class support which |
paulb@21 | 61 | permits the use of properties in the libxml2dom implementation, thus |
paulb@21 | 62 | simplifying the code somewhat.</p> |
paulb@21 | 63 | </body> |
paulb@21 | 64 | </html> |