Citat [EMAIL PROTECTED]:
> I've a DOM tree with empty Elements .... so I'd like to add the Content
> of
> these elements :
>
> public static Document Answer(Document docXML)
> {
> Document docXML2 = docXML;
> NodeList NL = doc2XML.getElementsByTagName("Entite");
> Node NoeudEntite = NL.item(0);
Text NoeudText = docXML2.createTextNode("YourTextHere");
NoeudEntite.appendChild(NoeudText);
> return docXML2;
> }
I don't think you have to return the document, as java always pass objects by
reference.
What you do is just create a new textnode using the documentnode, then you just
append this textnode to your elementnode.
(MUST be the element's owner documentnode (NoeudEntite.getOwnerDocument() can
be used to get the owner document, but here you already have it.))
\\|//
(@ @)
-----oOOo-(_)-oOOo-----
Ren� Jensen
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]