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