title: select elements with the name attribute name in special xml structure
body: <p>below is the structure of my xml document. I just want to first take the value of every node <code>&lt;attribute name="a"&gt;</code> then make a comparison of it with a given value. However I don't how to locate <code>&lt;attribute name="a"&gt;</code> of each node using xml selectnodes in c#. Google searches don't show any working solutions. </p>
  
  <pre><code>&lt;nodes&gt;     
   &lt;node name = "node1"&gt;      
    &lt;attribute name="a"&gt;This is node1 a&lt;/attribute&gt;
    &lt;attribute name="b"&gt;This is node1 b&lt;/attribute&gt;
   &lt;/node&gt;
   &lt;node name = "node2"&gt;      
    &lt;attribute name="a"&gt;This is node2 a&lt;/attribute&gt;
    &lt;attribute name="b"&gt;This is node2 b&lt;/attribute&gt;
   &lt;/node&gt;
   ...
  &lt;/nodes&gt;     
  </code></pre>