title: Reading values from within an XNode
body: <p>I have some code that is returning a XNode to me which looks like this:</p>
  
  <pre><code>&lt;File&gt;
    &lt;Component&gt;Main&lt;/Component&gt;
    &lt;Path&gt;C:\Main\&lt;/Path&gt;
    &lt;FileName&gt;main.txt&lt;/FileName&gt;
  &lt;/File&gt;
  </code></pre>
  
  <p>I need to have some C# code that will be able to pull out the value of Path for example (C:\Main). I know that if I was using an XML node I could do it like this:</p>
  
  <pre><code>String filePath = xmlNode["Path"].InnerText;
  </code></pre>
  
  <p>Does anybody know what the equivalent would be for an XNode? Any help is much appreciated!</p>