title: Getting nested XML attribute value using XmlDocument
body: <p><strong>Precursor</strong></p>
  
  <p>The bit you don't really need to know, but might help in solving the issue, is that I am writing a series of C# statements in LINQPad, that gets a collection of records from an ELMAH (error logging system) database, extracts the XML (AllXml) field from each record and loads each extract into an XmlDocument. Ok, that seems fairly easy, but now I need to traverse each document and get a particular value from it.</p>
  
  <p><strong>XML Structure Example</strong></p>
  
  <p><em>Note: I have removed any potentially confidential information here...</em></p>
  
  <pre><code>&lt;error type="System.Exception" time="2013-06-11T17:27:28.0122874Z"&gt;
      &lt;item name="PATH_INFO"&gt;
        &lt;value string="/foo/bar/thisIsTheValueIWant.aspx" /&gt;
      &lt;/item&gt;
      &lt;item name="PATH_TRANSLATED"&gt;
        &lt;value string="C:\site\foo\bar\thisIsPotentiallyAnotherValueIMightWant.aspx" /&gt;
      &lt;/item&gt;
      &lt;item name="QUERY_STRING"&gt;
        &lt;value string="meh" /&gt;
      &lt;/item&gt;
  &lt;/error&gt;
  </code></pre>
  
  <p>Consider that this XML exists as a string, I have loaded this like so:</p>
  
  <pre><code>XmlDocument doc = new XmlDocument();
  doc.LoadXml(xmlString);
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>It's not too difficult to get the value of a node, but in this instance, the value is stored as an attribute of a node, and I've no idea how to traverse that!</p>
  
  <p>I basically need to get the <code>value</code> node nested in the <code>item</code> node with <code>name</code>, <code>"PATH_INFO"</code>, and then get the value of the <code>"string"</code> attribute.</p>
  
  <p>How can I achieve this?</p>