xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Dupras <bri...@centera.com>
Subject Merge multiple XML Docs into one XML Doc
Date Tue, 25 Jan 2000 18:16:16 GMT
OK - this should be an easy one, but so far I've yet to find a definitive

I have a system where I'm given multiple XML DOM Documents that I need to
process and merge into a single DOM Document.  The known portions of the
input Documents get processed, while the unknown portions need to be copied
over directly.

The question is, how do I properly insert entire nodes (and their childeren)
from one document to another?  Do I have to write my own recursive copy

I'm free to use either the DOM functions, or XSLT.


Given as DOM Documents:
			<replaceme id="a"/>

			<replaceme id="b">
			<inserthere thexml="doc1">

		<inserthere thexml="doc1">

Created from scratch:
			<replaced>doc2 id b</replaced>
				<replaced>doc1 id a</replaced>

Brian Dupras
Centera Information Systems, Inc.
phone	303.939.0200 x294
fax	303.939.0111
web	http://www.centera.com
email	briand@centera.com

View raw message