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