<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Brett,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I read you article in developer works on
importing a childNode or Element from one document to another document
using DOM.</FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="http://www-106.ibm.com/developerworks/xml/library/x-tipmvdom.html">http://www-106.ibm.com/developerworks/xml/library/x-tipmvdom.html</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I wnat to do the same with JDOM. couldn't figure
out how to do that.</FONT></DIV>
<DIV><FONT face=Arial size=2>This is what i am trying to do:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>a) I have a template.xml</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> <root></FONT></DIV>
<DIV><FONT face=Arial size=2>
<element1></FONT></DIV>
<DIV><FONT face=Arial size=2>
<child1/></FONT></DIV>
<DIV><FONT face=Arial size=2>
<child2/></FONT></DIV>
<DIV><FONT face=Arial size=2>
</element></FONT></DIV>
<DIV><FONT face=Arial size=2> </root></FONT></DIV>
<DIV><FONT face=Arial size=2>b) I want to create a new xml from the template.xml
. Also a outside process result will tell be how mant <element1> should
the new document have under <root></FONT></DIV>
<DIV><FONT face=Arial size=2>c) So if the outside process ask me to add 2 such
<element1> child under the new xml file's <root>, I would have to
take the template of <element1> from the "template.xml" and add that 2
times under <root> to get my new xml file.</FONT></DIV>
<DIV><FONT face=Arial size=2>---------------basically adding row to a
database.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>You have nicely show that using w3c.dom.Node....but
how would I do it in JDOM.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help is appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Raju</FONT></DIV></BODY></HTML>