Keep in mind that your xml file must have one root root. Here is the Linq parsing in Xml:
var xdoc = XDocument.Load(path_to_xml); var entries = from e in xdoc.Descendants("entry") select new { Id = (int)e.Attribute("id"), Type = (string)e.Attribute("type"), Name = (string)e.Element("name"), Description = (string)e.Element("description") };
Query will return a sequence of anonymous objects corresponding to each input element (with property identifiers, type, name and description).
Sergey Berezovskiy
source share