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