title: How to count number of XML nodes that contain specific value
body: <p>I am looking for how to count the nodes in an XML file that contain a value of "No" as well as the total number of elements.</p>
  
  <p>I have the element count working fine, but I am not sure of the logic to look inside the XML for a value to count.</p>
  
  <p>To get the total count I am using:</p>
  
  <pre><code>    XmlDocument readDoc = new XmlDocument();
      readDoc.Load(MapPath("Results.xml"));
      int count = readDoc.SelectNodes("root/User").Count;
      lblResults.Text = count.ToString();
  </code></pre>
  
  <p>Below is my XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
  &lt;root&gt;
    &lt;User&gt;
      &lt;URL&gt;http://www.example.com&lt;/URL&gt;
      &lt;JSEnabled&gt;Yes&lt;/JSEnabled&gt;
    &lt;/User&gt;
    &lt;User&gt;
     &lt;URL&gt;http://www.example.com&lt;/URL&gt;
     &lt;JSEnabled&gt;Yes&lt;/JSEnabled&gt;
   &lt;/User&gt;
   &lt;User&gt;
     &lt;URL&gt;http://www.example.com&lt;/URL&gt;
     &lt;JSEnabled&gt;Yes&lt;/JSEnabled&gt;
   &lt;/User&gt;
   &lt;User&gt;
     &lt;URL&gt;http://www.example.com&lt;/URL&gt;
     &lt;JSEnabled&gt;Yes&lt;/JSEnabled&gt;
   &lt;/User&gt;
   &lt;User&gt;
     &lt;URL&gt;http://www.example.com&lt;/URL&gt;
     &lt;JSEnabled&gt;No&lt;/JSEnabled&gt;
   &lt;/User&gt;
  </code></pre>
  
  <p></p>