<Root xmlns="http://tempuri.org/DataSourceSchemaConfig.xsd">
<Node>
<Name>Peter</Name>
</Node>
<Node>
<Name>John</Name>
</Node>
</Root>
How do I get List of Names?
I've was trying this, but it doesn't work, where is my mistake?
var lists = from node in nodes.Descendants()
where node.Name.LocalName.Equals("Node")
select node.Elements("Name").First().Value;
L.B SOLUTION WORKS ONLY IF I REMOVE xmlns="http://tempuri.org/DataSourceSchemaConfig.xsd" from my ROOT tag.