You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jean-Charles DUFOUR <jc...@ifrance.com> on 2001/01/04 17:10:08 UTC

Add Node

Please I need some help,

I've an object Document result from a xml file parsed,
and I want to add a Node to this Document.

If I use this code :
	Document otherDoc= new DocumentImpl();  // just to have another doc
	Element newNode = doc.createElement("NewNodeName");
	myDoc.getFisrtChild().appendChild(newNode); // myDoc is the original doc

It trows an DOMException

Can you please give me a simple and correct code sample ?

Thanks
 
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif