Search found 1 match

by balmerhevi
Sat Nov 12, 2016 9:07 am
Forum: General XML Questions
Topic: how to read text file as xml?
Replies: 3
Views: 4609

Re: how to read text file as xml?

using LINQ is the simplest way... StringBuilder result = new StringBuilder(); foreach (XElement level1Element in XElement.Load(@"D:\product.xml").Elements("Brand")) { result.AppendLine(level1Element.Attribute("name").Value); foreach (XElement level2Element in level1Elem...