title: C# Parse XML exchange rates into dictionary from ECB
body: <p>Using this URL from European Central Bank:</p>
  
  <p><a href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" rel="nofollow noreferrer">www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml</a></p>
  
  <p>I would like to import the currency symbol and rate into a Dictionary or object.  I've got it reading into an xml doc but I'm having trouble picking out the node attributes.</p>
  
  <p>Thanks</p>
  
  <pre><code>string xmlString;
          using (var client = new WebClient())
          {
              xmlString = client.DownloadString("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml");
          }
  
          var xmlDoc = new XmlDocument();
          xmlDoc.LoadXml(xmlString);
  
          foreach(XmlNode node  in xmlDoc.SelectNodes("//*/Cube/@currency"))
          {
              // add currency and rate to dictionary
          }
  </code></pre>