[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Merge two XML files

Subject: Re: Merge two XML files
From: Rob Rohan <me@xxxxxxxxxxxx>
Date: 29 Apr 2003 19:05:36 -0700
merge xml files .net
I don't know if this will help, but I am writing the same kind of
process. You can see the sheet here
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ashpool/Tessier/com/rohanclan/ashpool/libxslt/doJoin.xsl

(watch for line wrap)

What you are talking about is similar to an SQL join if I understand you
correctly and that is what that sheet does. It doesn't use keys yet and
it is not bug free, but it might give you some ideas.

Cheers,
Rob Rohan

http://treebeard.sourceforge.net
http://ashpool.sourceforge.net


On Tue, 2003-04-29 at 18:01, Kim Tran wrote:
> I have 2 XML files that I want to be able to merge them together given a 
> list of keys.  I have searched the group but the examples are slightly 
> different than ours.  Our XML files have the following format:
> XML1.xml
> 
> <Document>
>   <row>
>     <column name="FirstName">Smith</column>
>     <column name="LastName">John</column>
>     <column name="Address">7777 First </column>
>   </row>
>   <row>
>     <column name="FirstName">Smith2</column>
>     <column name="LastName">John2</column>
>     <column name="Address">7777 Second </column>
>   </row>
> ...
> </Document>
> 
> XML2.xml
> <Document>
>   <row>
>     <column name="FirstName">Smith</column>
>     <column name="LastName">John</column>
>     <column name="Age">36</column>
>   </row>
>   <row>
>     <column name="FirstName">Smith2</column>
>     <column name="LastName">John2</column>
>     <column name="Age">40</column>
>   </row>
> ...
> </Document>
> 
> The result XML should be:
> <Document>
>   <row>
>     <column name="FirstName">Smith</column>
>     <column name="LastName">John</column>
>     <column name="Address">7777 First </column>
>     <column name="Age">36</column>
>   </row>
>   <row>
>     <column name="FirstName">Smith2</column>
>     <column name="LastName">John2</column>
>     <column name="Address">7777 Second </column>
>     <column name="Age">40</column>
>   </row>
> ...
> </Document>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.