moving the child nodes 2003-07-20 - By Utsav.Boobna@(protected)
Hi, when I am trying to move all the child nodes from one Node to another Element, it moves only the text nodes and skips all other nodes. I have attached below the relevant part of my code, please point out the mistake I am doing.
NodeList childlist = node.getChildNodes(); for(int i=0;i<childlist.getLength();i++) nodeEL.appendChild(node.removeChild(childlist.item(i))); nodeEL.normalize(); node.getParentNode().replaceChild(nodeEL, node);
here node is a Node and nodeEL is defined to be an Element. will this method copy the attributes of child nodes as well ??
Thanks, Utsav
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|