[jdom-interest] Merge XML files

Michael Salmon ms at speakeasy.net
Tue Jun 18 14:01:54 PDT 2002


get a Document for each file and add to the "all" element in the first
document the root element of the second document

ms-

On Tue, Jun 18, 2002 at 05:00:21PM +0000, Fanny Yeung wrote:
> Hi,
> 
> I am using b8. In my application, I need to dynamic generate jdom document.
> 
> I need to create an in memory Document object with a root element.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Dynamic>
> <All>
> </All>
> </Dynamic>
> 
> 
> I would like to append the document element from a xml file:
> <?xml version="1.0"?>
> <document>
> <title>Document2</title>
> </document>
> 
> So that the combined Document object would look like:
> <?xml version="1.0"?>
> <Dynamic>
> <All>
> <document>
> <title>Document2</title>
> </document>
> </All>
> </Dyanmic>
> 
> How can I do that?
> 
> 
> 
> 
> Thanks in advance.
> Fanny
> 
> _________________________________________________________________
> Join the world?s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list