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: Another question about using Xerces
Date Wed, 01 Mar 2000 19:46:39 GMT
"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

Mime
View raw message