[jdom-interest] A Fast Way to Merge Documents
jhunter at collab.net
Fri Dec 15 00:16:06 PST 2000
To move the doc2 root as a child to the doc1 root:
Element doc2root = doc2.getRootElement(); // get pointer to it
doc2.removeContent(doc2root); // take it from one tree
doc1.getRootElement().addContent(doc2root); // add to another tree
Easy and fast.
Aleksi Kallio wrote:
> We read stuff from database to JDOM Documents and then merge them together to make content of a web-page (through XSLT-translation).
> We use
> to merge documents. This seems to be very slow (because of copying?).
> What would be the FAST way to combine two documents? After all, it could be just changing a few references. The answer could also be a bit of hack...
> Are there any articles or references to JDOM performance issues?
> To control your jdom-interest membership:
More information about the jdom-interest