I have an xml from which I am trying to extract some information through LINQ query.
The format of the xml file looks like the following:
var xDoc = XDocument.Load(....);
var result = xDoc.Descendants("NextItem")
.Union(xDoc.Descendants("PreviousItem"))
.Select(n => new {ID = n.Attribute("id").Value, Name =n.Name, Value =n.Value });
--EDIT--
var result = XDocument.Load(....)
.Descendants("Sequences")
.Select(n=> n.Descendants("NextItem")
.Union(n.Descendants("PreviousItem"))
.Select(n2 => new { ID = n2.Attribute("id").Value, Name = n2.Name, Value = n2.Value })
);