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