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