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