title: XPath in VB.NET with HTML Agility pack
body: <p>i have the following vb.net code which works fine and in the message box i see the exact number of elements which have an id attribute.</p>
  
  <pre><code>Dim hreftext = htmldoc.DocumentNode.SelectNodes("//*[@id]")
   MsgBox(hreftext.Count)
  </code></pre>
  
  <p>now the problem is when i use the following on the message box it gives me Object reference not set to an instance of an object although there are 6 elemnts with the id rso</p>
  
  <pre><code>Dim hreftext = htmldoc.DocumentNode.SelectNodes("//*[@id='rso']")
   MsgBox(hreftext.Count)
  </code></pre>
  
  <p>is there any thing wrong with the second snippet?</p>