paulb@108 | 1 | Introduction
|
paulb@108 | 2 | ------------
|
paulb@108 | 3 |
|
paulb@20 | 4 | See docs/index.html for the libxml2dom documentation.
|
paulb@35 | 5 |
|
paulb@245 | 6 | Compatibility Warnings
|
paulb@245 | 7 | ----------------------
|
paulb@245 | 8 |
|
paulb@245 | 9 | From libxml2dom 0.4, nodeValue now returns different results in some cases.
|
paulb@245 | 10 | Previously, it was possible to get the textual contents of an element using
|
paulb@245 | 11 | the nodeValue property, although this is incompatible with the DOM
|
paulb@245 | 12 | specifications. Instead, you should now use the textContent property to get
|
paulb@245 | 13 | such data.
|
paulb@245 | 14 |
|
paul@343 | 15 | From libxml2dom 0.5, some XML-RPC nodes employ different properties.
|
paul@343 | 16 |
|
paulb@108 | 17 | Contact, Copyright and Licence Information
|
paulb@108 | 18 | ------------------------------------------
|
paulb@108 | 19 |
|
paulb@108 | 20 | The current Web page for libxml2dom at the time of release is:
|
paulb@108 | 21 |
|
paulb@108 | 22 | http://www.boddie.org.uk/python/libxml2dom.html
|
paulb@108 | 23 |
|
paulb@108 | 24 | Copyright and licence information can be found in the docs directory - see
|
paulb@292 | 25 | docs/COPYING.txt, docs/lgpl-3.0.txt and docs/gpl-3.0.txt for more information.
|
paulb@108 | 26 |
|
paulb@108 | 27 | Dependencies
|
paulb@108 | 28 | ------------
|
paulb@108 | 29 |
|
paulb@108 | 30 | libxml2 Tested with libxml2 2.6.17.
|
paulb@108 | 31 | Use --with-python=<path to python executable> if building from
|
paulb@108 | 32 | source. Previous releases of libxml2 in the 2.6 series may work,
|
paulb@108 | 33 | but releases before 2.6.16 are not recommended.
|
paulb@222 | 34 |
|
paulb@222 | 35 | For Windows users, see also the packages for libxml2, available
|
paulb@222 | 36 | from the following site:
|
paulb@222 | 37 |
|
paulb@222 | 38 | http://users.skynet.be/sbi/libxml-python/
|
paulb@222 | 39 |
|
paulb@108 | 40 | Python Tested with Python 2.4.
|
paulb@108 | 41 | Python releases from 2.2 onwards should be compatible with
|
paulb@108 | 42 | libxml2dom. The principal requirement from such releases is the
|
paulb@108 | 43 | new-style class support which permits the use of properties in
|
paulb@108 | 44 | the libxml2dom implementation.
|
paulb@108 | 45 |
|
paulb@64 | 46 | Testing
|
paulb@64 | 47 | -------
|
paulb@64 | 48 |
|
paulb@64 | 49 | Some of the tests require libxml2macro.py to be run on the test source code
|
paulb@64 | 50 | first. Read the docstrings for the various test files before attempting to run
|
paulb@145 | 51 | any of them. See also docs/NOTES_libxml2macro.txt for more information. Note
|
paulb@145 | 52 | that such tests are retained for historical purposes and/or curiosity since
|
paulb@145 | 53 | libxml2macro.py is no longer supported.
|
paulb@64 | 54 |
|
paulb@35 | 55 | Issues
|
paulb@35 | 56 | ------
|
paulb@35 | 57 |
|
paulb@178 | 58 | The presence of xmlns attributes in serialised documents was called into
|
paulb@191 | 59 | question, and the tests/namespace*.py files attempt to show the current
|
paulb@191 | 60 | behaviour of libxml2dom.
|
paulb@178 | 61 |
|
paulb@35 | 62 | Use of importNode seems to cause some kind of memory issue, probably related
|
paulb@41 | 63 | to nodes being shared across documents. This was observed in libxml2 2.6.0 but
|
paulb@41 | 64 | appears to be fixed in libxml2 2.6.16.
|
paulb@50 | 65 |
|
paulb@78 | 66 | Even compared to minidom, importNode may seem very slow (even the
|
paulb@50 | 67 | libxml2dom.macrolib implementation, too). A way is needed to get libxml2 to do
|
paulb@50 | 68 | the node copying itself.
|
paulb@50 | 69 |
|
paul@343 | 70 | New in libxml2dom 0.5 (Changes since libxml2dom 0.4.7)
|
paul@343 | 71 | ------------------------------------------------------
|
paul@343 | 72 |
|
paul@346 | 73 | * Fixed text node handling to work around the libxml2 tendency to merge text
|
paul@346 | 74 | nodes in its own functions.
|
paul@343 | 75 | * Changed some XML-RPC node properties in order to retain underlying DOM
|
paul@344 | 76 | properties such as data.
|
paul@348 | 77 | * Added convenience methods to the XML-RPC implementation providing combined
|
paul@348 | 78 | node creation and insertion. Introduced similar conveniences into the SOAP
|
paul@348 | 79 | implementation. These methods are similar to those found in the XMPP
|
paul@348 | 80 | implementation.
|
paul@344 | 81 | * Enabled prettyprinting support, finally.
|
paul@349 | 82 | * Added the hasChildNodes method, requested by Nick Galbreath.
|
paul@350 | 83 | * Fixed the Debian packaging to use python-central.
|
paul@343 | 84 |
|
paul@332 | 85 | New in libxml2dom 0.4.7 (Changes since libxml2dom 0.4.6)
|
paul@332 | 86 | --------------------------------------------------------
|
paul@332 | 87 |
|
paul@332 | 88 | * Fixed the ownerElement of attributes created by XPath queries, and in all
|
paul@332 | 89 | other situations involving the implementation's get_node method.
|
paul@338 | 90 | * Fixed SVG matrix operations which should have involved matrix
|
paul@338 | 91 | post-multiplication.
|
paul@332 | 92 | * Replaced the getElementById implementation with one based on libxml2's
|
paul@332 | 93 | own support for finding attributes declared as identifiers.
|
paul@332 | 94 | * Introduced support for validation, together with the libxml2dom.errors
|
paul@340 | 95 | module. Relax-NG, XML Schema and Schematron are supported, depending on
|
paul@340 | 96 | libxml2 support.
|
paul@338 | 97 | * Improved error messages related to parsing.
|
paul@339 | 98 | * Added DOMConfiguration support to documents.
|
paul@332 | 99 |
|
paulb@322 | 100 | New in libxml2dom 0.4.6 (Changes since libxml2dom 0.4.5)
|
paulb@322 | 101 | --------------------------------------------------------
|
paulb@322 | 102 |
|
paulb@322 | 103 | * Exposed the libxml2 support for processing XInclude declarations.
|
paulb@322 | 104 |
|
paulb@303 | 105 | New in libxml2dom 0.4.5 (Changes since libxml2dom 0.4.4)
|
paulb@303 | 106 | --------------------------------------------------------
|
paulb@303 | 107 |
|
paulb@317 | 108 | * Fixed crashes when parsing empty documents.
|
paulb@303 | 109 | * Fixed operations involving the standard XML_NAMESPACE value, particularly
|
paulb@303 | 110 | setAttributeNS.
|
paulb@303 | 111 | * Introduced deletion of conflicting attributes in setAttributeNS.
|
paulb@303 | 112 | * Added slightly nicer errors for parsing and serialising.
|
paulb@306 | 113 | * Added some support for SOAP and XML-RPC message processing.
|
paulb@303 | 114 |
|
paulb@288 | 115 | New in libxml2dom 0.4.4 (Changes since libxml2dom 0.4.3)
|
paulb@288 | 116 | --------------------------------------------------------
|
paulb@288 | 117 |
|
paulb@292 | 118 | * Relicensed under the LGPL version 3 or later (fixing PKG-INFO file).
|
paulb@288 | 119 | * Improved XMPP support for messages, presence and events.
|
paulb@297 | 120 | * Added Ubuntu Feisty (7.04) package support.
|
paulb@288 | 121 |
|
paulb@261 | 122 | New in libxml2dom 0.4.3 (Changes since libxml2dom 0.4.2)
|
paulb@261 | 123 | --------------------------------------------------------
|
paulb@261 | 124 |
|
paulb@267 | 125 | * Enforced well-formedness in parse operations unless otherwise requested.
|
paulb@275 | 126 | * Fixed access to null doctype properties.
|
paulb@275 | 127 | * Added getElementById, firstChild and lastChild to the Node class.
|
paulb@261 | 128 | * Added a __hash__ method to the Node class.
|
paulb@275 | 129 | * Moved document checking into the Node class.
|
paulb@275 | 130 | * Added an iterator for the NamedNodeMap class.
|
paulb@261 | 131 | * Expanded the svg and events modules, including a test of SVG events.
|
paulb@279 | 132 | * Split the debian-stable packages into debian-sarge and debian-etch.
|
paulb@261 | 133 |
|
paulb@255 | 134 | New in libxml2dom 0.4.2 (Changes since libxml2dom 0.4.1)
|
paulb@255 | 135 | --------------------------------------------------------
|
paulb@255 | 136 |
|
paulb@255 | 137 | * Added missing impl attribute to NamedNodeMap, fixing attribute retrieval.
|
paulb@255 | 138 | * Added documentElement to Document.
|
paulb@255 | 139 | * Fixed and expanded the events module.
|
paulb@255 | 140 | * Added lots of functionality to the svg module.
|
paulb@255 | 141 |
|
paulb@250 | 142 | New in libxml2dom 0.4.1 (Changes since libxml2dom 0.4)
|
paulb@250 | 143 | ------------------------------------------------------
|
paulb@250 | 144 |
|
paulb@250 | 145 | * Fixed the absence of CDATA node creation and importing.
|
paulb@250 | 146 |
|
paulb@217 | 147 | New in libxml2dom 0.4 (Changes since libxml2dom 0.3.6)
|
paulb@217 | 148 | ------------------------------------------------------
|
paulb@217 | 149 |
|
paulb@222 | 150 | * Changed the nodeValue property to return None for various node types, as
|
paulb@222 | 151 | specified in the DOM specification (Level 3).
|
paulb@226 | 152 | * Fixed various "not supported" exceptions and added tests which can raise
|
paulb@226 | 153 | "wrong document" exceptions.
|
paulb@217 | 154 | * Introduced an Implementation class, permitting specialised node creation.
|
paulb@217 | 155 | * Added SVG-specific document support.
|
paulb@231 | 156 | * Made parseURI work for HTML documents.
|
paulb@231 | 157 | * Fixed getElementsByTagName(NS), as reported by Christian Seiler.
|
paulb@239 | 158 | * Fixed previousSibling, nextSibling and parentNode crashes using
|
paulb@239 | 159 | suggestions from Christian Seiler.
|
paulb@239 | 160 | * Reintroduced node comparisons using suggestions from Christian Seiler.
|
paulb@242 | 161 | * Fixed the absence of the CDATA node type.
|
paulb@234 | 162 | * Added the textContent property to nodes.
|
paulb@239 | 163 | * Added a getDOMImplementation function.
|
paulb@234 | 164 | * Added an experimental events module.
|
paulb@245 | 165 | * Added an htmlencoding parameter to the parse functions, as requested by
|
paulb@245 | 166 | Iliyan Peychev.
|
paulb@217 | 167 |
|
paulb@207 | 168 | New in libxml2dom 0.3.6 (Changes since libxml2dom 0.3.5)
|
paulb@207 | 169 | --------------------------------------------------------
|
paulb@207 | 170 |
|
paulb@207 | 171 | * Added cloneNode almost as a synonym for importNode (which, unlike in the
|
paulb@207 | 172 | DOM specification, is present on all nodes).
|
paulb@210 | 173 | * Introduced Debian stable package details - suggested by Robert Siemer.
|
paulb@213 | 174 | * Changed libxml2mod import details to try libxmlmods - suggested by Lucian
|
paulb@213 | 175 | Wischik.
|
paulb@207 | 176 |
|
paulb@201 | 177 | New in libxml2dom 0.3.5 (Changes since libxml2dom 0.3.4)
|
paulb@201 | 178 | --------------------------------------------------------
|
paulb@201 | 179 |
|
paulb@201 | 180 | * Fixed nodeType for HTML document elements - reported by Robert Siemer.
|
paulb@201 | 181 | * Fixed string results from XPath expressions - reported by Robert Siemer.
|
paulb@201 | 182 |
|
paulb@191 | 183 | New in libxml2dom 0.3.4 (Changes since libxml2dom 0.3.3)
|
paulb@191 | 184 | --------------------------------------------------------
|
paulb@191 | 185 |
|
paulb@191 | 186 | * Attempted to introduce generated prefixes for attributes having namespaces
|
paulb@191 | 187 | but whose names are unprefixed.
|
paulb@195 | 188 | * Added support for xmlns attribute retrieval (getAttributeNS) and detection
|
paulb@195 | 189 | (hasAttributeNS).
|
paulb@197 | 190 | * Added the length attribute to NamedNodeMap; renamed the length method on
|
paulb@197 | 191 | NodeList, adding a length attribute.
|
paulb@191 | 192 |
|
paulb@187 | 193 | New in libxml2dom 0.3.3 (Changes since libxml2dom 0.3.2)
|
paulb@187 | 194 | --------------------------------------------------------
|
paulb@187 | 195 |
|
paulb@187 | 196 | * Removed redundant weakref usage.
|
paulb@187 | 197 | * Added explicit copyright and licensing information to source files.
|
paulb@187 | 198 |
|
paulb@183 | 199 | New in libxml2dom 0.3.2 (Changes since libxml2dom 0.3.1)
|
paulb@183 | 200 | --------------------------------------------------------
|
paulb@183 | 201 |
|
paulb@183 | 202 | * Improved the xmlns attribute creation controls.
|
paulb@183 | 203 |
|
paulb@165 | 204 | New in libxml2dom 0.3.1 (Changes since libxml2dom 0.3)
|
paulb@165 | 205 | ------------------------------------------------------
|
paulb@165 | 206 |
|
paulb@165 | 207 | * Fixed empty namespace declarations on elements created with namespaceURI
|
paulb@165 | 208 | set to None. Previously, such declarations were missing.
|
paulb@178 | 209 | * Fixed attribute creation and introduced stricter controls over the
|
paulb@178 | 210 | construction of xmlns attributes.
|
paulb@165 | 211 |
|
paulb@158 | 212 | New in libxml2dom 0.3 (Changes since libxml2dom 0.2.4)
|
paulb@158 | 213 | ------------------------------------------------------
|
paulb@153 | 214 |
|
paulb@158 | 215 | * Imposed much stricter tests on strings used with the libxml2dom API.
|
paulb@158 | 216 | Strings given as arguments to methods and functions must now only contain
|
paulb@158 | 217 | ASCII characters; any other character data must be provided as Unicode
|
paulb@158 | 218 | objects. This change fixes various issues with XPath expressions, and
|
paulb@158 | 219 | quite probably various other things.
|
paulb@153 | 220 | * Fixed parentNode on Document objects (which caused xml.dom.ext.PrettyPrint
|
paulb@153 | 221 | to crash).
|
paulb@153 | 222 | * Added some support for the doctype attribute and related information.
|
paulb@158 | 223 | * libxml2dom is now licensed under the LGPL - see docs/COPYING.txt for
|
paulb@158 | 224 | details.
|
paulb@153 | 225 |
|
paulb@148 | 226 | New in libxml2dom 0.2.4 (Changes since libxml2dom 0.2.3)
|
paulb@148 | 227 | --------------------------------------------------------
|
paulb@148 | 228 |
|
paulb@148 | 229 | * Fixed Unicode conversions in the Node's xpath method.
|
paulb@148 | 230 |
|
paulb@135 | 231 | New in libxml2dom 0.2.3 (Changes since libxml2dom 0.2.2)
|
paulb@135 | 232 | --------------------------------------------------------
|
paulb@135 | 233 |
|
paulb@135 | 234 | * Fixed the parse function's docstring.
|
paulb@139 | 235 | * Added the owner element to obtained attribute nodes.
|
paulb@142 | 236 | * Fixed Debian package changelog distribution identifiers.
|
paulb@135 | 237 |
|
paulb@129 | 238 | New in libxml2dom 0.2.2 (Changes since libxml2dom 0.2.1)
|
paulb@129 | 239 | --------------------------------------------------------
|
paulb@129 | 240 |
|
paulb@129 | 241 | * Fixed exception raising in parseURI, adding a docstring to explain the
|
paulb@129 | 242 | current limitations around HTML parsing.
|
paulb@129 | 243 |
|
paulb@108 | 244 | New in libxml2dom 0.2.1 (Changes since libxml2dom 0.2)
|
paulb@108 | 245 | ------------------------------------------------------
|
paulb@108 | 246 |
|
paulb@118 | 247 | * Moved libxml2macro script to the tools directory.
|
paulb@118 | 248 | * Added getElementsByTagNameNS.
|
paulb@123 | 249 | * Added a normalize implementation.
|
paulb@118 | 250 | * Added HTML parsing support.
|
paulb@120 | 251 | * Added prettyprinting support.
|
paulb@118 | 252 | * Fixed parseURI.
|
paulb@118 | 253 | * Introduced better testing for Unicode objects, especially since things
|
paulb@118 | 254 | like rdflib like to subclass the unicode type, and it might be more
|
paulb@118 | 255 | convenient to detect such subclasses and convert their values
|
paulb@118 | 256 | automatically.
|
paulb@118 | 257 | * Improved some of the API documentation.
|
paulb@118 | 258 | * Introduced better suppression of warnings, network access, and other
|
paulb@118 | 259 | potentially intrusive libxml2 features.
|
paulb@118 | 260 | * Reorganised the documentation, expanding the README.txt file at the
|
paulb@118 | 261 | expense of the HTML documentation, but removing older, less relevant
|
paulb@118 | 262 | information.
|
paulb@118 | 263 | * Added Debian package support.
|
paulb@50 | 264 |
|
paulb@108 | 265 | New in libxml2dom 0.2 (Changes since libxml2dom 0.1.3)
|
paulb@108 | 266 | ------------------------------------------------------
|
paulb@108 | 267 |
|
paulb@118 | 268 | * Adopted libxml2macro code within the libxml2dom classes, removing any
|
paulb@118 | 269 | dependencies on the libxml2 module - this makes everything much faster
|
paulb@118 | 270 | and virtually removes any necessity to use libxml2macro.
|
paulb@118 | 271 | * Improved attribute and document node handling.
|
paulb@118 | 272 | * Introduced document reference management.
|
paulb@118 | 273 | * Introduced NodeList wrapper objects.
|
paulb@59 | 274 |
|
paulb@108 | 275 | New in libxml2dom 0.1.3 (Changes since libxml2dom 0.1.2)
|
paulb@108 | 276 | --------------------------------------------------------
|
paulb@108 | 277 |
|
paulb@118 | 278 | * Fixed createElement.
|
paulb@118 | 279 | * Introduced experimental libxml2macro tools, tests and libraries.
|
paulb@108 | 280 |
|
paulb@108 | 281 | New in libxml2dom 0.1.2 (Changes since libxml2dom 0.1.1)
|
paulb@108 | 282 | --------------------------------------------------------
|
paulb@59 | 283 |
|
paulb@118 | 284 | * Fixed getAttributeNode and getAttributeNodeNS.
|
paulb@118 | 285 | * Added comment node creation.
|
paulb@118 | 286 | * Fixed empty namespace usage with elements and attributes.
|
paulb@118 | 287 | * Introduced usage of the libxml2 file and memory parsing features.
|
paulb@118 | 288 | * Introduced suppression of DTD retrieval and validation as the default
|
paulb@118 | 289 | behaviour.
|
paulb@118 | 290 | * Added experimental XPath method support.
|
paulb@59 | 291 |
|
paulb@108 | 292 | New in libxml2dom 0.1.1
|
paulb@108 | 293 | -----------------------
|
paulb@59 | 294 |
|
paulb@118 | 295 | * Fixed text node creation.
|
paulb@118 | 296 | * Fixed setAttributeNS.
|
paulb@118 | 297 | * Added encoding parameters to convenience methods.
|
paulb@118 | 298 | * Added the missing previousSibling property.
|
paulb@118 | 299 | * Added release number to the package.
|
paulb@59 | 300 |
|
paulb@108 | 301 | Release Procedures
|
paulb@108 | 302 | ------------------
|
paulb@59 | 303 |
|
paulb@108 | 304 | Update the libxml2dom/__init__.py and libxml2dom/macrolib/__init__.py
|
paulb@108 | 305 | __version__ attributes.
|
paulb@108 | 306 | Change the version number and package filename/directory in the documentation.
|
paul@351 | 307 | Update the version number in setup.py.
|
paul@351 | 308 | Check the setup.py file and ensure that all package directories are mentioned.
|
paulb@108 | 309 | Change code examples in the documentation if appropriate.
|
paulb@108 | 310 | Update the release notes (see above).
|
paulb@108 | 311 | Update the package release notes (in the packages directory).
|
paulb@183 | 312 | Check the release information in the PKG-INFO file.
|
paulb@108 | 313 | Tag, export.
|
paulb@108 | 314 | Archive, upload.
|
paulb@108 | 315 | Make packages (see below).
|
paul@351 | 316 | Update PyPI, PythonInfo Wiki entries.
|
paulb@59 | 317 |
|
paulb@108 | 318 | Making Packages
|
paulb@108 | 319 | ---------------
|
paulb@59 | 320 |
|
paulb@125 | 321 | To make Debian-based packages:
|
paulb@59 | 322 |
|
paulb@125 | 323 | 1. Create new package directories under packages if necessary.
|
paulb@118 | 324 | 2. Make a symbolic link in the distribution's root directory to keep the
|
paulb@210 | 325 | Debian tools happy; choose one of the following:
|
paulb@59 | 326 |
|
paulb@125 | 327 | ln -s packages/ubuntu-hoary/python2.4-libxml2dom/debian/
|
paulb@322 | 328 | ln -s packages/ubuntu-feisty/python-libxml2dom/debian/
|
paulb@285 | 329 | ln -s packages/debian-sarge/python2.3-libxml2dom/debian/
|
paulb@285 | 330 | ln -s packages/debian-etch/python-libxml2dom/debian/
|
paul@351 | 331 | ln -s packages/debian-lenny/python-libxml2dom/debian/
|
paulb@108 | 332 |
|
paulb@118 | 333 | 3. Run the package builder:
|
paulb@108 | 334 |
|
paulb@118 | 335 | dpkg-buildpackage -rfakeroot
|
paulb@108 | 336 |
|
paulb@118 | 337 | 4. Locate and tidy up the packages in the parent directory of the
|
paulb@118 | 338 | distribution's root directory.
|