merge xml files into one c#
using (var output = File.Create(originalFileName))
{
foreach (var file in new[] { "File1", "File2" })
{
using (var input = File.OpenRead(file))
{
input.CopyTo(output);
}
}
}
merge xml files into one c#
using (var output = File.Create(originalFileName))
{
foreach (var file in new[] { "File1", "File2" })
{
using (var input = File.OpenRead(file))
{
input.CopyTo(output);
}
}
}
c# merge two xml files
var xml1 = XDocument.Load("file1.xml");
var xml2 = XDocument.Load("file2.xml");
//Combine and remove duplicates
var combinedUnique = xml1.Descendants("AllNodes")
.Union(xml2.Descendants("AllNodes"));
//Combine and keep duplicates
var combinedWithDups = xml1.Descendants("AllNodes")
.Concat(xml2.Descendants("AllNodes"));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us