You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by gu...@teleco.upv.es on 2000/01/26 15:59:13 UTC
DOM
Hi friends!
I am using Cocoon 1.5,Apache Web Server 1.3.9 and Jserver 1.1b3 and
openxml 1.0.6.
I am trying to take a child from one Document and put it in another
Document. Something like:
NodeList fila = doc.getElementsByTagName( "NAME" );
Node rep=fila.item(0).getFirstChild();
NodeList col = doc1.getElementsByTagName( "BIRTHDAY" );
col.item(0).appendChild(rep);
But i can not get any results. Is my code correct ? or maybe Is posible
to do it in this way?
RE: DOM
Posted by James & Sue Ann Birchfield <js...@home.com>.
Look at the CloneNode method in the XSPUtils class.
It performas a 'deep copy' of the node.
=====================================
James Birchfield
Chief Technology Officer
jmbirchfield@proteus-technologies.com
http://www.proteus-technologies.com
=====================================
> -----Original Message-----
> From: guiferpo@teleco.upv.es [mailto:guiferpo@teleco.upv.es]
> Sent: Wednesday, January 26, 2000 9:59 AM
> To: cocoon-dev@xml.apache.org
> Subject: DOM
>
>
> Hi friends!
>
> I am using Cocoon 1.5,Apache Web Server 1.3.9 and Jserver 1.1b3 and
> openxml 1.0.6.
>
> I am trying to take a child from one Document and put it in another
> Document. Something like:
>
> NodeList fila = doc.getElementsByTagName( "NAME" );
> Node rep=fila.item(0).getFirstChild();
> NodeList col = doc1.getElementsByTagName( "BIRTHDAY" );
> col.item(0).appendChild(rep);
>
> But i can not get any results. Is my code correct ? or maybe Is posible
> to do it in this way?
>