So I'm out of luck? I can't swap Sun's DOM 1 support with Apache's? I don't want to use the DOM 2 support from Apache. Is there a way to just get the DOM level 1 API? ----- Original Message ----- From: Arnaud Le Hors To: Sent: Friday, March 03, 2000 4:17 PM Subject: Re: How to deal with differences in DOM implementations? > 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