1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>libxml2dom</title> 5 <meta name="generator" 6 content="amaya 8.1a, see http://www.w3.org/Amaya/"> 7 <link href="styles.css" rel="stylesheet" type="text/css"> 8 </head> 9 <body> 10 <h1>libxml2dom</h1> 11 <p>The libxml2dom package provides a traditional DOM wrapper around the 12 Python bindings for <a href="http://www.xmlsoft.org">libxml2</a>. In 13 contrast 14 to the <a href="http://www.xmlsoft.org/python.html">standard libxml2 15 bindings</a>, libxml2dom provides an API reminiscent of <a 16 href="http://docs.python.org/lib/module-xml.dom.minidom.html">minidom</a>, 17 <a href="http://www.doxdesk.com/software/py/pxdom.html">pxdom</a> and 18 other <a href="http://pyxml.sourceforge.net/topics/">Python-based and 19 Python-related XML toolkits</a>. Performance is 20 fairly respectable since libxml2dom makes direct use of libxml2mod - 21 the low-level wrapping of libxml2 for Python. Moreover, serialisation 22 of 23 documents is much faster than many other toolkits because libxml2dom 24 can make direct 25 use of libxml2 rather than employing Python-level mechanisms to visit 26 and serialise nodes.</p> 27 <h2>Copyright and Licence</h2> 28 <p>For reasons of consistency, libxml2dom uses the same MIT-style 29 licence as 30 libxml2. See the file <code>COPYING.txt</code> in the <code>docs</code> 31 directory within the source code distribution.</p> 32 <h2>Installation</h2> 33 <p>Given the availability of libxml2, libxml2dom only needs to reside 34 on the 35 PYTHONPATH and can be installed using the <code>setup.py</code> script 36 provided:</p> 37 <pre>python setup.py install</pre> 38 <h2>Dependencies and Installation Issues</h2> 39 <p>The following descriptions identify dependencies and describe 40 appropriate 41 installation issues with each dependency:</p> 42 <h3>libxml2 2.6.16</h3> 43 <p>Building libxml2 from source and configuring the Python bindings can 44 be 45 done as follows:</p> 46 <pre>cd libxml2-2.6.16<br>./configure --with-python=/usr/local/bin/python<br>make</pre> 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 <p>Previous releases of libxml2 in the 2.6 series may work, but some 52 bugs 53 were observed with the previously recommended 2.6.0 and these may not 54 have 55 been fixed until 2.6.16 or slightly earlier.</p> 56 <h4>Issues</h4> 57 <p>The <code>patches</code> directory in the source code distribution 58 contains a patch against libxml2 2.5.7 which resolves an issue exposed 59 by 60 libxml2dom. Although it is recommended that later releases of libxml2 61 are 62 used instead, the source code distribution of libxml2 2.5.7 can be 63 patched as 64 follows:</p> 65 <pre>patch -p0 < libxml2dom/patches/libxml2/libxml.c.diff</pre> 66 <p>The command should be run outside/above the <code>libxml2-2.5.7</code> 67 directory, and the stated path should be adjusted accordingly.</p> 68 <h3>Python 2.2</h3> 69 <p>Python releases from 2.2 onwards should be compatible with 70 libxml2dom. The 71 principal requirement from such releases is the new-style class support 72 which 73 permits the use of properties in the libxml2dom implementation, thus 74 simplifying the code somewhat.</p> 75 <h2>Changelog</h2> 76 <h3>New in libxml2dom 0.2 (Changes since libxml2dom 0.1.3)</h3> 77 <ul> 78 <li>Adopted <a href="libxml2macro.html">libxml2macro</a> code within 79 the libxml2dom classes, removing any dependencies on the libxml2 module 80 - this makes everything much faster and virtually removes any necessity 81 to use libxml2macro.</li> 82 </ul> 83 <h3>New in libxml2dom 0.1.3 (Changes since libxml2dom 0.1.2)</h3> 84 <ul> 85 <li>Fixed createElement.</li> 86 <li>Introduced experimental libxml2macro tools, tests and libraries.</li> 87 </ul> 88 <h3>New in libxml2dom 0.1.2 (Changes since libxml2dom 0.1.1)</h3> 89 <ul> 90 <li>Fixed getAttributeNode and getAttributeNodeNS.</li> 91 <li>Added comment node creation.</li> 92 <li>Fixed empty namespace usage with elements and attributes.</li> 93 <li>Introduced usage of the libxml2 file and memory parsing features.</li> 94 <li>Introduced suppression of DTD retrieval and validation as the 95 default behaviour.</li> 96 <li>Added experimental XPath method support.</li> 97 </ul> 98 <h3>New in libxml2dom 0.1.1 (Changes since libxml2dom 0.1)</h3> 99 <ul> 100 <li>Fixed text node creation.</li> 101 <li>Fixed setAttributeNS.</li> 102 <li>Added encoding parameters to convenience methods.</li> 103 <li>Added the missing previousSibling property.</li> 104 <li>Added release number to the package.</li> 105 </ul> 106 </body> 107 </html>