xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hodges <harmo...@swbell.net>
Subject Another question about using Xerces
Date Wed, 01 Mar 2000 00:19:50 GMT
I'm trying to build a document using Xerces.  Here's some simple code that demonstrates my

  public XercesTest() {
    DOMImplementationImpl imp = new DOMImplementationImpl();
    Document doc = imp.createDocument(null, "Test", null);
    Element e = doc.createElement("dummElement");

Here's the error I receive:
org.apache.xerces.dom.DOMExceptionImpl: HIERARCHY_REQUEST_ERR
 at org.apache.xerces.dom.DocumentImpl.insertBefore(Compiled Code)
 at org.apache.xerces.dom.NodeImpl.appendChild(Compiled Code)
 at XercesTest.XercesTest.<init>(XercesTest.java:19)
 at XercesTest.XercesTest.main(XercesTest.java:23)

What's a HIERARCHY_REQUEST_ERR and where is it documented?
What's the correct way to add a new element to a document?


View raw message