Advanced merge of xml documents
-
Hi I need to merge several versions of xml documents which contain different data. I can't just append one document to another, instead it need to substitute elements which are the same (meaning having same tag in a hierarchy). One file will have higher precedence than the other and would substitute the data of the other one if same tag. I think an example would explain better than words. David Ellis 2006 M R 2005 Neil Marshall David R. Ellis USA R G 2003 Andrew Stanton David R. Ellis 2006 R USA R 2005 Neil Marshall G 2003 Andrew Stanton Notice in the merged version that for example director for Snakes on a Plane been updated and country added to same movie. Is there any way to do this using standard tools, like C#/.NET or SQLServer 2005 or some other library/product? Or do I need to implement this myself? Thanks for any pointers, Patric /Patric My C# blog: C# Coach
-
Hi I need to merge several versions of xml documents which contain different data. I can't just append one document to another, instead it need to substitute elements which are the same (meaning having same tag in a hierarchy). One file will have higher precedence than the other and would substitute the data of the other one if same tag. I think an example would explain better than words. David Ellis 2006 M R 2005 Neil Marshall David R. Ellis USA R G 2003 Andrew Stanton David R. Ellis 2006 R USA R 2005 Neil Marshall G 2003 Andrew Stanton Notice in the merged version that for example director for Snakes on a Plane been updated and country added to same movie. Is there any way to do this using standard tools, like C#/.NET or SQLServer 2005 or some other library/product? Or do I need to implement this myself? Thanks for any pointers, Patric /Patric My C# blog: C# Coach
Patric_J wrote:
I need to merge several versions of xml documents which contain different data.
Patric_J wrote:
using standard tools, like C#/.NET
One way to manupulate XML in this fashion would be to use the System.XML.XmlDocument and the XML DOM that it represents. There is information everywhere about using XML DOM. It comes in real handy so you may as well bite the bullet and get familiar with it. :)
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real"
Score: 1.0 in the Soap Boxled mike