I\'ve xml as following:
Log In
XDocument xdoc = XDocument.Load("test.XML"); var query = xdoc.Descendants("root") .Elements() .ToDictionary(r => r.Attribute("name").Value, r => r.Value);
Remeber to include :
using System.Linq; using System.Xml.Linq;