[jdom-interest] create xml tree

Mikael Petterson (KI/EAB) mikael.petterson at ericsson.com
Mon Feb 2 03:51:03 PST 2004


Hi,

I am trying to find out if there is a way of adding children in a way that the parent-child relation will be kept.

I have a method to create the relation inbetween parent and child. I then want to make a recursive add of 
children to each parent. I have about 8 levels of parent-child relations. Doing 

parent.addContent(child); 

seems only to add the first level. How can I make it recursive?

Do I have to keep track of the element that I start to add children to and when all my addContent have been done I add the first element to the
root and last create a Document?

BR

//Mikael

This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.




More information about the jdom-interest mailing list