xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HERRICK, CHUCK (SBCSI)" <CH6...@momail.sbc.com>
Subject RE: Another question about using Xerces
Date Wed, 01 Mar 2000 19:59:32 GMT
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

Mime
View raw message