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