on this xml :

<MYDB>
<Database>
<ConnectionString>MyConnectionString</ConnectionString>
</Database>
<Mapping>
<Map LocationInFile="0" dbColumn="Hello1"></Map>
<Map LocationInFile="1" dbColumn="Hello2"></Map>
<Map LocationInFile="2" dbColumn="Hello3"></Map>
<Map LocationInFile="3" dbColumn="Hello4"></Map>
</Mapping>
</MYDB>

i perform the linq to XML query :

XDocument xmlDoc = XDocument.Load("c:\\MyFile.xml");
var mapNodes = (from mapNode in xmlDoc.Elements("Mapping")
where mapNode.Attribute("LocationInFile").Value == "0"
select mapNode.Element("Map")).Single();

i get no results, why ?