I have this XML:
<Test>
<element>toto</element>
<element>tata</element>
</Test>
How I can get the nodes “element”?. I see on the web I can get them with:
var elements = from element in xmlDoc.Descendants("element")
select element;
But “elements” is empty!
EDIT 1: I’m loading the XDocument with this exact XML:
<Test xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices">
<element>toto</element>
<element>tata</element>
</Test>
Ok well there’s your problem, your names have to be qualified with the appropriate XML namespace.