Subject: Re: [xsl] Merging two XML documents From: cutlass <cutlass@xxxxxxxxxxx> Date: Fri, 09 Mar 2001 13:37:16 +0000 |
Being relatively new to xml I have come across a problem, which is as follows: What is the best method to merge and/or update 2 XML's with the same structure. The merging/updating XML will only contain a section of a larger XML it is to be merged into but the structure will be identical from the root node. Examples are shown below: XML to merge <page> <type> <address> <addressline1>34 th Street</addressline1> <addressline2>USA</addressline2> </address> </type>
faq on using document() function http://www.dpawson.co.uk/xsl/N2602.html#N18697
faq on merging http://www.dpawson.co.uk/xsl/merge.html
test.xml ( as adopted from Steve Tinney from XSLT FAQ ) ----------------------------------- <?xml version="1.0" encoding="utf-8"?> <mother> <file>test1.xml</file> <file>test2.xml</file> </mother>
test1.xml ------------------------------------- <?xml version="1.0" encoding="utf-8"?> <page> <order> <item cost="100">CD-ROM</item> </order> <type> <name>abc</name> <name>jkl</name> <name>mno</name> <name>pqr</name> <address> <addressline1>43 sdfsdf</addressline1> </address> <address> <addressline1>64 The Road</addressline1> <addressline2>Big City</addressline2> <addressline3>UK</addressline3> </address> </type> </page>
test2.xml ------------------------------- <?xml version="1.0" encoding="utf-8"?> <page> <type> <address> <addressline1>34 th Street</addressline1> <addressline2>USA</addressline2> </address> </type> </page>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Merging two XML documents, Simon Reed | Thread | RE: [xsl] Merging two XML documents, Simon Reed |
RE: [xsl] xsl unique position, Michael Kay | Date | Re: [xsl] xsl unique position, David Carlisle |
Month |