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