Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
Put a node into a new xml document
Joined: Sep 27, 2004
Mar 08, 2005 23:42:00
I have a node like this:
<A a="a" b="b">
I need to write this entire node into a new xml document in the placeholder as follows:
<!-- place for the above node -->
I am using DOM as the parser. Any ideas on how this can be done.
I tried using root.importNode(), however, it appends only
<A a="a" b="b"> and misses the rest of the child nodes.
SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Joined: Feb 23, 2005
Mar 09, 2005 12:25:00
Check out the following method in the Node Interface (org.w3c.dom)
Node appendChild(Node newChild)
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
Don't get me started about those stupid
subject: Put a node into a new xml document
creating a Document out of a larger Document
Reusing translated nodes - XSLT newbie
Creating a chart using xslt
Print out values of xml tags
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013