Hi Andreas,
Try something like this:
// get the root element of "myNewDocument"
Element root = myNewDocument.getRootElement();
// detach it from that document
root.detach();
// then add it to the first document
myDocument.getRootElement().add(root);
Your "more info" element will be added after the
Hi!
How do I add a Document to an existing Document? Or merge two Documents.
Document myDocument =
DocumentHelper.parseText("info");
Document myNewDocument = DocumentHelper.parseText("more info");
I want to have the both nodes in the first Document.
Thanks.
--
Andreas Andersson
IT Dept.
Travelsta