Oops.
Right you are, and obviously so.
I'm blaming that beer I had with dinner last
night;-)
-----Original Message-----
From: Arnaud Le Hors [mailto:lehors@us.ibm.com]
Sent: Wednesday, March 01, 2000 1:47 PM
To: general@xml.apache.org
Subject: Re: Another question about using Xerces
"HERRICK, CHUCK (SBCSI)" wrote:
>
> I think he could have written
> --
> > Element e = doc.createElement("dummElement");
> > doc.getDocumentElement().appendChild(e);
> --
> as easily
> --
> > Element e = doc.createElement("dummElement");
> > e.appendChild(e);
> --
No. Trying to make a node a child of itself would definitely raise a
HIERARCHY_REQUEST_ERR DOMException.
> I believe doc.getDocumentElement() get's the root
> Element of a Document, to which you would then
> appendChild().
That's correct.
> I'm no XML'spert, just an XMLaholic, so correct me
> if I'm wrong, please.
Done. :-)
--
Arnaud Le Hors - IBM Cupertino, XML Technology Group
|