Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Advanced merge of xml documents

Advanced merge of xml documents

Scheduled Pinned Locked Moved XML / XSL
csharptoolsxmltutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Patric_J
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • P Patric_J

      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

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      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 Box

      led mike

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups