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