1 <?xml version="1.0" encoding="iso-8859-1"?> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>libxml2dom</title> 5 <meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" /> 6 <link href="styles.css" rel="stylesheet" type="text/css" /> 7 </head> 8 9 <body> 10 <h1>libxml2dom</h1> 11 12 <p>The libxml2dom package provides a traditional DOM wrapper around the 13 Python bindings for libxml2. In contrast to the libxml2 bindings, libxml2dom 14 provides an API reminiscent of minidom, pxdom and other Python-based and 15 Python-related XML toolkits. Performance is disappointing, given the typical 16 high speed of libxml2 processing, but this is to be expected since large 17 numbers of Python objects are instantiated at two levels of document tree 18 representation. However, serialisation of documents is much faster than many 19 other toolkits because it can make direct use of libxml2.</p> 20 21 <h2>Copyright and Licence</h2> 22 23 <p>For reasons of consistency, libxml2dom uses the same MIT-style licence as 24 libxml2. See the file <code>COPYING.txt</code> in the <code>docs</code> 25 directory within the source code distribution.</p> 26 27 <h2>Installation</h2> 28 29 <p>Given the availability of libxml2, libxml2dom only needs to reside on the 30 PYTHONPATH and can be installed using the <code>setup.py</code> script 31 provided:</p> 32 <pre>python setup.py install</pre> 33 34 <h2>Dependencies and Installation Issues</h2> 35 36 <p>The following descriptions identify dependencies and describe appropriate 37 installation issues with each dependency:</p> 38 39 <h3>libxml2 2.6.16</h3> 40 41 <p>Building libxml2 from source and configuring the Python bindings can be 42 done as follows:</p> 43 <pre>cd libxml2-2.6.16 44 ./configure --with-python=/usr/local/bin/python 45 make</pre> 46 47 <p>If you are to use an installation of Python installed outside 48 <code>/usr/local</code> then specify the "prefix" accordingly. Install 49 (possibly as <code>root</code>) in the usual way:</p> 50 <pre>make install</pre> 51 52 <p>Previous releases of libxml2 in the 2.6 series may work, but some bugs 53 were observed with the previously recommended 2.6.0 and these may not have 54 been fixed until 2.6.16 or slightly earlier.</p> 55 56 <h4>Issues</h4> 57 58 <p>The <code>patches</code> directory in the source code distribution 59 contains a patch against libxml2 2.5.7 which resolves an issue exposed by 60 libxml2dom. Although it is recommended that later releases of libxml2 are 61 used instead, the source code distribution of libxml2 2.5.7 can be patched as 62 follows:</p> 63 <pre>patch -p0 < libxml2dom/patches/libxml2/libxml.c.diff</pre> 64 65 <p>The command should be run outside/above the <code>libxml2-2.5.7</code> 66 directory, and the stated path should be adjusted accordingly.</p> 67 68 <h3>Python 2.2</h3> 69 70 <p>Python releases from 2.2 onwards should be compatible with libxml2dom. The 71 principal requirement from such releases is the new-style class support which 72 permits the use of properties in the libxml2dom implementation, thus 73 simplifying the code somewhat.</p> 74 75 <h2>Changelog</h2> 76 77 <h3>New in libxml2dom 0.1.3 (Changes since libxml2dom 0.1.2)</h3> 78 <ul> 79 <li>Fixed createElement.</li> 80 <li>Introduced experimental libxml2macro tool and library.</li> 81 </ul> 82 83 <h3>New in libxml2dom 0.1.2 (Changes since libxml2dom 0.1.1)</h3> 84 <ul> 85 <li>Fixed getAttributeNode and getAttributeNodeNS.</li> 86 <li>Added comment node creation.</li> 87 <li>Fixed empty namespace usage with elements and attributes.</li> 88 <li>Introduced usage of the libxml2 file and memory parsing features.</li> 89 <li>Introduced suppression of DTD retrieval and validation as the default 90 behaviour.</li> 91 <li>Added experimental XPath method support.</li> 92 </ul> 93 94 <h3>New in libxml2dom 0.1.1 (Changes since libxml2dom 0.1)</h3> 95 <ul> 96 <li>Fixed text node creation.</li> 97 <li>Fixed setAttributeNS.</li> 98 <li>Added encoding parameters to convenience methods.</li> 99 <li>Added the missing previousSibling property.</li> 100 <li>Added release number to the package.</li> 101 </ul> 102 </body> 103 </html>