title: How to query this XML document in C#.NET 3.5
body: <p>I have an XML document of the form:</p>
  
  <pre><code>&lt;metadata&gt;
        &lt;item name="Name" type="xs:string" length="102"/&gt;
        &lt;item name="Email" type="xs:string" length="202"/&gt;
  &lt;/metadata&gt;
  &lt;data&gt;
      &lt;row&gt;
          &lt;value&gt;Daniel&lt;/value&gt;
          &lt;value&gt;daniel@no-reply.com&lt;/value&gt;
      &lt;/row&gt;
      &lt;row&gt;
          &lt;value&gt;George&lt;/value&gt;
          &lt;value&gt;george@no-reply.com&lt;/value&gt;             
      &lt;/row&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>The ordering and number of columns may change so it is not sufficient to assume //row/value[1]/text() always holds 'Name'.</p>
  
  <p>What is the best way to query the document using the metadata names to pull the right values?</p>
  
  <p>I am querying the document in C#.NET3.5 so can use XDocument, XPath etc... whichever is the best for the job.</p>