2 x xml parse to 1 xml

2 x xml parse to 1 xml

Post by N9 » Fri, 13 Mar 2009 22:24:47



Hi

If i got one XML from yester day and one new XML from today, is't
possible to parse thus two XML and generate a new XML, base on the
diffent data. The XML structure are same in thus 2 XML

//N9

 
 
 

2 x xml parse to 1 xml

Post by Cerebru » Sat, 14 Mar 2009 02:00:44


I know of two ways:

1. Read each XML into a Dataset and use the Dataset.Merge() method to
get a consolidated dataset. Then write out the XML from the Dataset.
This scenario is well illustrated at http://support.microsoft.com/kb/311530.

2. Iterate through each target node and copy/append nodes from the
source file. An example is provided here: http://www.aspcode.net/Merging-two-XML-files.aspx


Quote:> Hi

> If i got one XML from yester day and one new XML from today, is't
> possible to parse thus two XML and generate a new XML, base on the
> diffent data. The XML structure are same in thus 2 XML

> //N9