View Single Post
  #1 (permalink)  
Old 11-27-2007, 02:23 PM
alwz_nikhil alwz_nikhil is offline
Member
 
Join Date: Nov 2007
Posts: 4
Rep Power: 0
alwz_nikhil is on a distinguished road
Default Merge Two Xml files ????
I have two xml files, which I want to merge.
Both are having same structure…


Code:
Eg. INPUT-FILE-1
<library>
	<book isbn="1">
		<name>Book-11</name>
		<author>steve</author>
		<price>2.99</price>
	</book>
		<book isbn="2">
		<name>Book-22</name>
		<author>john</author>
		<price>12.99</price>
	</book>
</library>
------------------------------------------------
INPUT-FILE-2
<library>
	<book isbn="1">
		<name>Book-11</name>
		<author>steve</author>
		<price>2.99</price>
	</book>
		<book isbn="3">
		<name>Book-33</name>
		<author>johnthan</author>
		<price>12.99</price>
	</book>
</library>
-------------------------------------------
OUTPUT-file
<library>
	<book isbn="1">
		<name>Book-11</name>
		<author>steve</author>
		<price>2.99</price>
	</book>
		<book isbn="2">
		<name>Book-22</name>
		<author>john</author>
		<price>12.99</price>
	</book>
</book>
		<book isbn="3">
		<name>Book-33</name>
		<author>johnthan</author>
		<price>12.99</price>
	</book>

</library>
Merge should provide third file without any repetition of any record.
Which parser to use and how to use ???
Any help on this ???????????
Thanks !!

__________________
ME
Reply With Quote