title: C# XmlDocument SelectNodes
body: <p>I have an xml document with a root element, two child elements, 'diagnostic' and 'results'.  The 'results' element then has an arbitrary number of elements with the name 'result'</p>
  
  <p>When this is loaded into an XmlDocument it is easy to navigate the structure and see that this is exactly how things operate.  I can write a recursive function that picks out all the "result" elements.  The XmlDocument.SelectNodes("//results") finds a node no problem.  </p>
  
  <p>However, 
  * XmlDocument.SelectNodes("//results/result") finds nothing.<br>
  * XmlDocument.SelectNodes("//result") finds nothing.</p>
  
  <p>I've talked to a co-worker and he's had grief using Xpath in XmlDocument.SelectNodes.  Anyone else run into this kind of problem?  Any solutions?</p>
  
  <p>XML FILE:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="10" yahoo:created="2009-08-07T10:19:59Z" yahoo:lang="en-US" yahoo:updated="2009-08-07T10:19:59Z" yahoo:uri="http://query.yahooapis.com/v1/yql?q=select+*+from+search.news+where+query%3D%22Tanzania%22"&gt;
      &lt;diagnostics&gt;
          &lt;publiclyCallable&gt;true&lt;/publiclyCallable&gt;
          &lt;url execution-time="47"&gt;&lt;![CDATA[http://boss.yahooapis.com/ysearch/news/v1/Tanzania?format=xml&amp;start=0&amp;count=10]]&gt;&lt;/url&gt;
          &lt;user-time&gt;49&lt;/user-time&gt;
          &lt;service-time&gt;47&lt;/service-time&gt;
          &lt;build-version&gt;2579&lt;/build-version&gt;
      &lt;/diagnostics&gt;
      &lt;results&gt;
          &lt;result xmlns="http://www.inktomi.com/"&gt;
              &lt;abstract&gt;Kakungulu Cup winners SC Villa face Tanzania’s Simba SC this afternoon at the National stadium in Dar es salaam. “We had a very tiresome journey. The road was so bad and the road blocks were so many. However, we finally reached but the boys were so tired,” said Kato.&lt;/abstract&gt;
              &lt;clickurl&gt;http://lrd.yahooapis.com/_ylc=X3oDMTQ4cXAxcnRoBF9TAzIwMjMxNTI3MDIEYXBwaWQDb0pfTWdwbklrWW5CMWhTZnFUZEd5TkouTXNxZlNMQmkEY2xpZW50A2Jvc3MEc2VydmljZQNCT1NTBHNsawN0aXRsZQRzcmNwdmlkA21VVGlta2dlQXUzeEYuM0xGQkQzR1pUU1FIS0dORXA4cUk4QUJJX1U-/SIG=12vhpskdd/**http%3A//www.monitor.co.ug/artman/publish/sports/SC_Villa_face_Simba_in_Tanzania_89289.shtml&lt;/clickurl&gt;
              &lt;date&gt;2009/08/07&lt;/date&gt;
              &lt;language&gt;english&lt;/language&gt;
              &lt;source&gt;The Monitor&lt;/source&gt;
              &lt;sourceurl&gt;http://www.monitor.co.ug/&lt;/sourceurl&gt;
              &lt;time&gt;20:22:32&lt;/time&gt;
              &lt;title&gt;SC Villa face Simba in Tanzania&lt;/title&gt;
              &lt;url&gt;http://www.monitor.co.ug/artman/publish/sports/SC_Villa_face_Simba_in_Tanzania_89289.shtml&lt;/url&gt;
          &lt;/result&gt;
  </code></pre>
  
  <p>XPATH</p>
  
  <p>doc.SelectNodes("//result") produces no hits.</p>