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