XML News from Monday, February 2, 2004

I am pleased to announce the release of XOM 1.0d23, my open source, dual streaming/tree-based API for processing XML with Java. XOM is quite parsimonious with memory, far more so than most competing tree-based APIs, and it is the most "XML correct" of any of the major tree-based APIs for processing XML. XOM is fanatical about maintaining well-formedness at all times. I also suspect XOM is more code correct than most libraries for processing XML. It has an extensive unit test suite that achieves approximately 90% code coverage. The XOM tests have actually exposed numerous bugs in other libraries including Xerces, Crimson, Oracle, Piccolo, libxml, JDOM, Saxon, and more. (This weekend's 2.6.1 release of Xerces did fix the last two bugs XOM's unit tests were tripping over, so that is the preferred parser for XOM.)

This is the *LAST CALL* development release of XOM 1.0. The next release will be 1.0 alpha 1, at which point I will declare API freeze and rule out gratuitous, backwards incompatible changes in the API until at least 2.0 (at some point in the indefinite future). If there are any method names or signatures that bother you in XOM, now is the time to let me know. I do plan some future releases, 1.0.1, 1.1, 1.2, etc. to add features and improve performance. However, I don't want to change the existing API after alpha 1 without a very good reason.

There are several big changes in this release. Some programs will need minor modifications to compile and run against the new release. Most notably, the various makeNode() methods in the NodeFactory class all return Nodes objects. This means a factory can replace one node type with a different node type (e.g. changing elements into attributes and vice versa) or replace a single node with several nodes.

In addition, I fiddled with the exception hierarchy to try to rationalize it. IllegalDataException and its subclasses have getData and setData methods to get and set the exact text that caused the exception. Subclasses include IllegalNameException, IllegalTargetException, and IllegalCharacterDataException. IllegalCharacterDataException is now used where IllegalDataException was used previously. Furthermore, NamespaceException has been broken up. IllegalNameException is used for problems with a namespace prefix. MalformedURIException is used for problems with a namespace URI. NamespaceConflictException, a subclass of WellformednessException, is used for cases where attributes, elements, and/or additional namespace declarations have conflicting bindings for the same prefix.

The nu.xom.xinclude package supports now the November 2003 Working Draft syntax of XInclude, including the xpointer, accept, accept-charset, and accept-language attributes. Documents will need to be rewritten to use the new syntax.

All legacy JDOM code has been replaced. The XOM code base is now completely independent of JDOM. (There never was much JDOM code in the first place, just parts of the Verifier class; but these parts have now all been replaced with different, faster algorithms based on table lookup.)

Other changes are listed on the web page. XOM is published under the Lesser General Public License (LGPL). Enjoy!


Daniel Veillard has released version 2.6.5 of libxml2, the open source XML C library for Gnome. This release fixes numerous bugs.