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