Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.
' Load the file1.xml and file2.xml into memory Dim f1 = XDocument.Load("C:\Working Directory\file1.xml") Dim f2 = XDocument.Load("C:\Working Directory\file2.xml") ' Query both documents and Join on the SN node in each Dim results = From n1 In f1.Descendants("Table1") _ Where n1.Element("SN") IsNot Nothing _ From n2 In f2.Descendants("Table1") _ Where n2.Element("SN") IsNot Nothing AndAlso n1.Element("SN").Value = n2.Element("SN").Value _ Select n1, n2 ' Add the NSD node in file2.xml to the corresponding node in file1.xml For Each pair in results pair.n1.Add(pair.n2.Element("NSD")) Next ' Save file1.xml as file3.xml f1.Save("C:\Working Directory\file3.xml")
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|VB.net VSTO Excel Ribbon error||4||29|
|Visual C# Windows Project - Clone Form||4||39|
|What is needed to become a DBA?||7||56|
|VB.NET : Selection Out of Range Parameter Name : Value||22||37|
Join the community of 500,000 technology professionals and ask your questions.