Im loading an xml from stream
XDocument xmlFile = XDocument.Load(stream);
var query = from c in xmlFile.Elements("//Band") //error here
select c;
modify query....
Is it possible to find elements which are in format of Xpath ? (//Band) ?
p.s. I can use descendants but I want to ask about xpath….
Use the
Descendants()method:Or if you want to specify true XPath expressions, use the following Extensions:
XPathEvaluate()XPathSelectElement()XPathSelectElements()