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