I'm curious how people are dealing with the
differences in DOM implementations. I started out with OpenXML, then
switched to Xerces, now I'm trying to support JAXP as well. JAXP is Sun's
For instance, in JAXP, here's their example of how
to create an element and add it to a document:
Document doc = db.newDocument
Element root = doc.createElement
Writer out = new
In Xerces, this produces an exception. The
last line must be changed to:
If the same change is applied to JAXP,
getDocumentElement() returns a null, since the document is empty.
This is a bit troubling. I had hoped to
support different implementations of the DOM.