Writing the output of IEnumerable<XElement> to a XML File
- by Googler
HI folks ,
This is my code to read two xml files and merge their elemnts. I want to write the output to an xml file.
This is my code.
IEnumerable<XElement> list0 =
doc.Descendants(node1).Concat(doc2.Descendants(node2));
foreach (XElement el in list0)
Console.WriteLine(el);
Instead of writing to…