xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Le Hors <leh...@us.ibm.com>
Subject Re: How to deal with differences in DOM implementations?
Date Fri, 03 Mar 2000 22:17:57 GMT
Eric Hodges wrote:
> That's not the problem.

Yes, it is.

> I know DOM 1 doesn't specify how to create a
> document. The problem is with the
> doc.getDocumentElement().appendChild(node) vs doc.appendChild(node).  Apache
> wants me to do the first, Sun wants me to the second.

But this is because the DOM Level 2 spec says that the createDocument()
method, that xerces supports, not only creates the Document node itself
but also the root element node (which you get a hand on by calling
getDocumentElement()). While, I guess, Sun's newDocument() method on the
other hand only create the Document node and leave it to the user to
create and append the root element.
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

View raw message