Re: [dom4j-user] adding a Document to a Document

2004-11-25 Thread Ben Munat
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

[dom4j-user] adding a Document to a Document

2004-11-24 Thread Andreas Andersson
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