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 * Changed some XML-RPC node properties in order to retain underlying DOM
74 properties such as data.
75 * Added convenience methods to the XML-RPC implementation, with combined
76 node creation and insertion if requested. Introduced similar conveniences
77 into the SOAP implementation.
78 * Enabled prettyprinting support, finally.
79
80 New in libxml2dom 0.4.7 (Changes since libxml2dom 0.4.6)
81 --------------------------------------------------------
82
83 * Fixed the ownerElement of attributes created by XPath queries, and in all
84 other situations involving the implementation's get_node method.
85 * Fixed SVG matrix operations which should have involved matrix
86 post-multiplication.
87 * Replaced the getElementById implementation with one based on libxml2's
88 own support for finding attributes declared as identifiers.
89 * Introduced support for validation, together with the libxml2dom.errors
90 module. Relax-NG, XML Schema and Schematron are supported, depending on
91 libxml2 support.
92 * Improved error messages related to parsing.
93 * Added DOMConfiguration support to documents.
94
95 New in libxml2dom 0.4.6 (Changes since libxml2dom 0.4.5)
96 --------------------------------------------------------
97
98 * Exposed the libxml2 support for processing XInclude declarations.
99
100 New in libxml2dom 0.4.5 (Changes since libxml2dom 0.4.4)
101 --------------------------------------------------------
102
103 * Fixed crashes when parsing empty documents.
104 * Fixed operations involving the standard XML_NAMESPACE value, particularly
105 setAttributeNS.
106 * Introduced deletion of conflicting attributes in setAttributeNS.
107 * Added slightly nicer errors for parsing and serialising.
108 * Added some support for SOAP and XML-RPC message processing.
109
110 New in libxml2dom 0.4.4 (Changes since libxml2dom 0.4.3)
111 --------------------------------------------------------
112
113 * Relicensed under the LGPL version 3 or later (fixing PKG-INFO file).
114 * Improved XMPP support for messages, presence and events.
115 * Added Ubuntu Feisty (7.04) package support.
116
117 New in libxml2dom 0.4.3 (Changes since libxml2dom 0.4.2)
118 --------------------------------------------------------
119
120 * Enforced well-formedness in parse operations unless otherwise requested.
121 * Fixed access to null doctype properties.
122 * Added getElementById, firstChild and lastChild to the Node class.
123 * Added a __hash__ method to the Node class.
124 * Moved document checking into the Node class.
125 * Added an iterator for the NamedNodeMap class.
126 * Expanded the svg and events modules, including a test of SVG events.
127 * Split the debian-stable packages into debian-sarge and debian-etch.
128
129 New in libxml2dom 0.4.2 (Changes since libxml2dom 0.4.1)
130 --------------------------------------------------------
131
132 * Added missing impl attribute to NamedNodeMap, fixing attribute retrieval.
133 * Added documentElement to Document.
134 * Fixed and expanded the events module.
135 * Added lots of functionality to the svg module.
136
137 New in libxml2dom 0.4.1 (Changes since libxml2dom 0.4)
138 ------------------------------------------------------
139
140 * Fixed the absence of CDATA node creation and importing.
141
142 New in libxml2dom 0.4 (Changes since libxml2dom 0.3.6)
143 ------------------------------------------------------
144
145 * Changed the nodeValue property to return None for various node types, as
146 specified in the DOM specification (Level 3).
147 * Fixed various "not supported" exceptions and added tests which can raise
148 "wrong document" exceptions.
149 * Introduced an Implementation class, permitting specialised node creation.
150 * Added SVG-specific document support.
151 * Made parseURI work for HTML documents.
152 * Fixed getElementsByTagName(NS), as reported by Christian Seiler.
153 * Fixed previousSibling, nextSibling and parentNode crashes using
154 suggestions from Christian Seiler.
155 * Reintroduced node comparisons using suggestions from Christian Seiler.
156 * Fixed the absence of the CDATA node type.
157 * Added the textContent property to nodes.
158 * Added a getDOMImplementation function.
159 * Added an experimental events module.
160 * Added an htmlencoding parameter to the parse functions, as requested by
161 Iliyan Peychev.
162
163 New in libxml2dom 0.3.6 (Changes since libxml2dom 0.3.5)
164 --------------------------------------------------------
165
166 * Added cloneNode almost as a synonym for importNode (which, unlike in the
167 DOM specification, is present on all nodes).
168 * Introduced Debian stable package details - suggested by Robert Siemer.
169 * Changed libxml2mod import details to try libxmlmods - suggested by Lucian
170 Wischik.
171
172 New in libxml2dom 0.3.5 (Changes since libxml2dom 0.3.4)
173 --------------------------------------------------------
174
175 * Fixed nodeType for HTML document elements - reported by Robert Siemer.
176 * Fixed string results from XPath expressions - reported by Robert Siemer.
177
178 New in libxml2dom 0.3.4 (Changes since libxml2dom 0.3.3)
179 --------------------------------------------------------
180
181 * Attempted to introduce generated prefixes for attributes having namespaces
182 but whose names are unprefixed.
183 * Added support for xmlns attribute retrieval (getAttributeNS) and detection
184 (hasAttributeNS).
185 * Added the length attribute to NamedNodeMap; renamed the length method on
186 NodeList, adding a length attribute.
187
188 New in libxml2dom 0.3.3 (Changes since libxml2dom 0.3.2)
189 --------------------------------------------------------
190
191 * Removed redundant weakref usage.
192 * Added explicit copyright and licensing information to source files.
193
194 New in libxml2dom 0.3.2 (Changes since libxml2dom 0.3.1)
195 --------------------------------------------------------
196
197 * Improved the xmlns attribute creation controls.
198
199 New in libxml2dom 0.3.1 (Changes since libxml2dom 0.3)
200 ------------------------------------------------------
201
202 * Fixed empty namespace declarations on elements created with namespaceURI
203 set to None. Previously, such declarations were missing.
204 * Fixed attribute creation and introduced stricter controls over the
205 construction of xmlns attributes.
206
207 New in libxml2dom 0.3 (Changes since libxml2dom 0.2.4)
208 ------------------------------------------------------
209
210 * Imposed much stricter tests on strings used with the libxml2dom API.
211 Strings given as arguments to methods and functions must now only contain
212 ASCII characters; any other character data must be provided as Unicode
213 objects. This change fixes various issues with XPath expressions, and
214 quite probably various other things.
215 * Fixed parentNode on Document objects (which caused xml.dom.ext.PrettyPrint
216 to crash).
217 * Added some support for the doctype attribute and related information.
218 * libxml2dom is now licensed under the LGPL - see docs/COPYING.txt for
219 details.
220
221 New in libxml2dom 0.2.4 (Changes since libxml2dom 0.2.3)
222 --------------------------------------------------------
223
224 * Fixed Unicode conversions in the Node's xpath method.
225
226 New in libxml2dom 0.2.3 (Changes since libxml2dom 0.2.2)
227 --------------------------------------------------------
228
229 * Fixed the parse function's docstring.
230 * Added the owner element to obtained attribute nodes.
231 * Fixed Debian package changelog distribution identifiers.
232
233 New in libxml2dom 0.2.2 (Changes since libxml2dom 0.2.1)
234 --------------------------------------------------------
235
236 * Fixed exception raising in parseURI, adding a docstring to explain the
237 current limitations around HTML parsing.
238
239 New in libxml2dom 0.2.1 (Changes since libxml2dom 0.2)
240 ------------------------------------------------------
241
242 * Moved libxml2macro script to the tools directory.
243 * Added getElementsByTagNameNS.
244 * Added a normalize implementation.
245 * Added HTML parsing support.
246 * Added prettyprinting support.
247 * Fixed parseURI.
248 * Introduced better testing for Unicode objects, especially since things
249 like rdflib like to subclass the unicode type, and it might be more
250 convenient to detect such subclasses and convert their values
251 automatically.
252 * Improved some of the API documentation.
253 * Introduced better suppression of warnings, network access, and other
254 potentially intrusive libxml2 features.
255 * Reorganised the documentation, expanding the README.txt file at the
256 expense of the HTML documentation, but removing older, less relevant
257 information.
258 * Added Debian package support.
259
260 New in libxml2dom 0.2 (Changes since libxml2dom 0.1.3)
261 ------------------------------------------------------
262
263 * Adopted libxml2macro code within the libxml2dom classes, removing any
264 dependencies on the libxml2 module - this makes everything much faster
265 and virtually removes any necessity to use libxml2macro.
266 * Improved attribute and document node handling.
267 * Introduced document reference management.
268 * Introduced NodeList wrapper objects.
269
270 New in libxml2dom 0.1.3 (Changes since libxml2dom 0.1.2)
271 --------------------------------------------------------
272
273 * Fixed createElement.
274 * Introduced experimental libxml2macro tools, tests and libraries.
275
276 New in libxml2dom 0.1.2 (Changes since libxml2dom 0.1.1)
277 --------------------------------------------------------
278
279 * Fixed getAttributeNode and getAttributeNodeNS.
280 * Added comment node creation.
281 * Fixed empty namespace usage with elements and attributes.
282 * Introduced usage of the libxml2 file and memory parsing features.
283 * Introduced suppression of DTD retrieval and validation as the default
284 behaviour.
285 * Added experimental XPath method support.
286
287 New in libxml2dom 0.1.1
288 -----------------------
289
290 * Fixed text node creation.
291 * Fixed setAttributeNS.
292 * Added encoding parameters to convenience methods.
293 * Added the missing previousSibling property.
294 * Added release number to the package.
295
296 Release Procedures
297 ------------------
298
299 Update the libxml2dom/__init__.py and libxml2dom/macrolib/__init__.py
300 __version__ attributes.
301 Change the version number and package filename/directory in the documentation.
302 Change code examples in the documentation if appropriate.
303 Update the release notes (see above).
304 Update the package release notes (in the packages directory).
305 Check the setup.py file and ensure that all package directories are mentioned.
306 Check the release information in the PKG-INFO file.
307 Tag, export.
308 Archive, upload.
309 Make packages (see below).
310 Update PyPI, PythonInfo Wiki, Vaults of Parnassus entries.
311
312 Making Packages
313 ---------------
314
315 To make Debian-based packages:
316
317 1. Create new package directories under packages if necessary.
318 2. Make a symbolic link in the distribution's root directory to keep the
319 Debian tools happy; choose one of the following:
320
321 ln -s packages/ubuntu-hoary/python2.4-libxml2dom/debian/
322 ln -s packages/ubuntu-feisty/python-libxml2dom/debian/
323 ln -s packages/debian-sarge/python2.3-libxml2dom/debian/
324 ln -s packages/debian-etch/python-libxml2dom/debian/
325
326 3. Run the package builder:
327
328 dpkg-buildpackage -rfakeroot
329
330 4. Locate and tidy up the packages in the parent directory of the
331 distribution's root directory.