This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > October 2005 > Combine 2 or more XMLDocuments into one...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Combine 2 or more XMLDocuments into one...
David Lozzi

2005-10-18, 6:29 pm

Hello,

I'm looking for the best option to combine two XMLDocuments into a single
document. I'm using ASP.Net using VB. I have a function that returns a
dataset in XML which works great if there is a single call of the function,
but at times I need to loop a few times and call the same function and
return its data and combine each looped data into one XMLDocument.

Thanks!!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com




Kevin Yu [MSFT]

2005-10-18, 10:22 pm

Hi David,

If the DataSet is returned in XML format, I suggest you do the following
for combination:

1. Load the two XML into DataSets.
2. Use DataSet.Merge to combine them.
3. Use DataSet.GetXml to get the XML string.

If the XML is not in the DataSet format, I think you have to loop in one
XmlDocument and add each node to another one.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews