This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Appending a Document to another
- To: "'Xsl-List (E-mail)" <xsl-list at mulberrytech dot com>
- Subject: Appending a Document to another
- From: "Anders K" <cyberspock at telia dot com>
- Date: Mon, 7 Feb 2000 10:29:32 +0100
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I wonder if there is anybody who can tell
me a simple way to add one or more XML-docs
to another Document ?
i.e.
Document A = new DocumentImpl();
... filling A up with stuff ...
// now I need to add some docs.
DOMParser dp = new DOMParser();
db.parse(somefile);
Document B = db.getDocument();
i tried
fc = A.getfirstchild();
fc.appendChild(B);
but got an exception wrong doc
or do I have to traverse the
Document B adding the nodes
one by one? (which seems to be so much fun ;-)
TIA
</anders>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list