XML node replacement

xml India
  • 13 years ago
    Hi,

    I have a problem in replacing a node in XML file. I have one Main.XML file. Main.XML has <season>......</season> nodes. This node repeats 3,4 times in this main.xml.
    I have one more sub.xml where in I am having only one <season></season> node. 
    This node is for a particular season say 'Summer'. In my Main.XMl the details
    of summer season may occur any where. So I need to replace this entire
    <season>...</Season> with the one from sub.xml file. So depending on the
    sub.xml which node I am having I need to search in main.xml for that
    corresponding node and replace with out disturbing the other nodes.

    I dont want to go by element by element, I want to replace entire node as some
    times the elements may not match in both XML file.

    Please help. Thanks in advance.


















  • 13 years ago
    Hi,
    I was trying something similar and asked for help on MSDN.  Here is the link to that discussion:
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1654345&SiteID=1

    I hope it helps.
    regards
    Ger







  • 13 years ago
    Hi,

    I just joined this forum. Do you still need help with this?

    Shay





Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor