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

Merging XML from Lookup table

Subject: Merging XML from Lookup table
From: "Tracy" <amit.shukla@xxxxxxxxxxx>
Date: Sun, 22 Feb 2004 10:37:27 -0800
xml lookup table
I have an XML in which data is coming from one source and another XML which
contains the matching IDs and their format is completely different (I can
modify the format if it doesn't work for the solution). I need to generate
an XML with matching IDs. But have no idea how to do that. Please help me.

Data.xml
////////////////////////////////////////////////////////////
<data>
	<customer>
		<row num="2" zip="56780" typeID="1" />
		<row num="3" zip="98264" typeID="1" />
		<row num="5" zip="45424" typeID="2" />
		<row num="1" zip="45722" typeID="1" />
		<row num="4" zip="75565" typeID="2" />
	</customer>
</data>
////////////////////////////////////////////////////////////

table.xml
////////////////////////////////////////////////////////////
<tables>
<table name="customer">
	<data>
		<row num="1" name="Kate Hudson" />
		<row num="2" name="Jon Wright" />
		<row num="3" name="Craig Wills" />
		<row num="4" name="Ben Stills" />
		<row num="5" name="Le Yan" />
		<row num="6" name="Mc Kin" />
		<row num="7" name="Vincent Dsouza" />
	</data>
</table>
<table name="customer">
	<data>
		<row typeID="1" type="Lease" />
		<row typeID="2" type="Hire" />
	</data>
</table>
</tables>
////////////////////////////////////////////////////////////

output.xml
////////////////////////////////////////////////////////////
<data>
	<customer>
		<row name="Jon Wright" zip="56780" type="Lease" />
		<row name="Craig Wills" zip="98264" type="Lease" />
		<row name="Le Yan" zip="45424" type="Hire" />
		<row name="Kate Hudson" zip="45722" type="Lease" />
		<row name="Ben Stills" zip="75565" type="Hire" />
	</customer>
</data>
////////////////////////////////////////////////////////////


 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.