xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ZAHIR, Mehnaaz, FM" <Mehnaaz.Za...@rbos.com>
Subject How to join 2 XML Documents into one..
Date Mon, 25 Sep 2000 08:56:10 GMT
I have been on this problem for quite some time now.... the problem is like

1. templateXML --> I've one XML template -- type is 'Document'
2. dataXML --> and I've a business XML data being generated -- type again is
3. The above dataXML(2) needs to append itself, to the end of the
'templateXML(1)' document, before it can be processed by my XSLT....
4. So HOW do I append the (no.2) to (no.1) ?

I am trying the following approach...

	Element dataRootElement = dataXML.getDocumentElement();
	Node n = // here I need to convert the above 'Element' to Node
	Document doc = (Document) templateXML.importNode ( n, true );

So this will give me back the Document 'templateXML' appended with 'dataXML'
--- to be fed to XSLT to produce HTML.... But I am not quite sure how I may
go about it..... May this whole approach is wrong? Any help will be greatly

I have searched the faqs too on both the Sun's and Apache's site...  but to
no avail....
I am using Xerces 1.2.0... so I can use 'importNode()'....

Thanks and rgrds

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.

View raw message