Merge xml files and the other way
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
Hello as title indicate i would like a tutorial on how i can merge multiple xml files into 1 bigger xml file and then split it again at a later time in vb.NET
This is much apreciated loove;
This is much apreciated loove;
hello anopm,
no idea if this works i didn't tested it
hope this works out for you.
but split it again no idea
why even split it again if you merge them in 1 file :lol:
no idea if this works i didn't tested it

hope this works out for you.
but split it again no idea
why even split it again if you merge them in 1 file :lol:
Code: Select all
' The actual "merge".
' The XmlDocument that we want to merge from.
Dim xdFrom As New XmlDocument()
xdFrom.Load(Application.StartupPath & "XmlTest2.xml")
' The XMLDocument that we want to merge to.
Dim xdTo As New XmlDocument()
xdTo.Load(Application.StartupPath & "XmlTest.xml")
' Loop through all of the nodes in the "from" document.
' We don't want to copy the root node in this instance.
For Each nod As XmlNode In xdFrom.DocumentElement.ChildNodes
' Import the node to our "to" document.
Dim tmpNod As XmlNode = xdTo.ImportNode(nod, True)
' Append this temporary node to the end of the "to" document
' but inside the root element.
xdTo.DocumentElement.AppendChild(tmpNod)
Next nod
' Save the "to" document with it's newly appended nodes.
xdTo.Save(Application.StartupPath & "XmlTest.xml")
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Dummy1912 wrote:hello anopm,Thanks seems to work, now i just need a way of doing the opposite
no idea if this works i didn't tested it
hope this works out for you.
but split it again no idea
why even split it again if you merge them in 1 file :lol:
cool glad that works
now we wait for someone with the opposite way :lol:
now we wait for someone with the opposite way :lol:
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Well before you append a new file to an existing one, you must write a marker and then the other file, after that you can split the new file by using the marker.
Code: Select all
Old file contents
<split marker>
New file contents
You can find me on Facebook or on Skype mihai_92b
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023