title: How to get the value of root element in xml
body: <p>I'm trying to make a Windows RT program and I can't seem to figure out how to get the value of the root element. The xmldocument only contains:</p>
  
  <p><code>&lt;double&gt;0.7423&lt;/double&gt;</code></p>
  
  <p>How would I go about getting the value "0.7422" using c# and window store? Every time I try something it returns a null value.</p>
  
  <p>This is what I've tried so far:</p>
  
  <pre><code>            `var getRate = from query in xmlDoc.Descendants("double")
                               select new
                               {
                                   Rate = query.Value
                               };
  
              foreach (var query in getRate)
              {
                  rate = Convert.ToDouble(query.Rate);
  
              }`
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>`var rate= xmlDoc.Root.Element("double").Value;
  
   var rate= xmlDoc.Element("double").Value;
  
   rate = (double)XElement.Load(xmlstream);`
  </code></pre>
  
  <p>But rate always returns a null value.</p>