> OK, how do I get the first instance of DOMImplementation so I can create the > DocumentType before I create the Document? I can only find a way to get a > DOMImplementation if I already have a Document.
Document toss = new org.apache.xerces.dom.DocumentImpl(); DOMImplementation impl = toss.getImplementation(); DocumentType type = impl.createDocumentType("root", "-//MyOrg//DTD Root 1.0//EN", http://my.org/root.dtd); Document doc = impl.createDocument("rootns", "root", type); // then add nodes to "doc" --Sean