title: Populate a dictionary<string, List<string>> from XML Document
body: <p>I want to populate a dictionary of type <code>&lt;string, List&lt;string&gt;&gt;</code> with the following xml.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;Currencies&gt;
    &lt;Currency name="USD"&gt;
      &lt;symbol&gt;$&lt;/symbol&gt;
      &lt;symbol&gt;USD&lt;/symbol&gt;
      &lt;symbol&gt;Dollar&lt;/symbol&gt;
    &lt;/Currency&gt;
    &lt;Currency name="INR"&gt;
      &lt;symbol&gt;Rs.&lt;/symbol&gt;
      &lt;symbol&gt;₹&lt;/symbol&gt;
    &lt;/Currency&gt;
  </code></pre>
  
  <p></p>
  
  <p>in a dictionary </p>
  
  <pre><code>Dictionary dctCurrency&lt;string,List&lt;string&gt;&gt;;
  </code></pre>
  
  <p>in this the currency name should be the key and all the symbol elements should be in the list of string.</p>
  
  <p>TIA</p>
  
  <p>I have tried the following code, </p>
  
  <pre><code>var currencyXmlDocument = XDocument.Load(currencySymbolsDefinition);
  var currencies = currencyXmlDocument.Root.DescendantNodes().OfType&lt;XElement&gt;();
  currencySymbolsConfiguration = currencies.ToDictionary(l =&gt; l.Attribute("name").Value
      , l =&gt; l.Attribute("code").Value);
  </code></pre>
  
  <p>but it isnt compiling</p>