title: C#/ Html Agility pack error "Value cannot be null. Parameter name: Source."
body: <p>I've used html agility pack before, and have had good results with a little bit of trial and error. I'm currently trying to use it to return a node set with an xpath I get by right- clicking "Copy XPath" in Firefox. I've done some searching, and I see that the browser will often add "tbody" for table tags. I tried it with removing this with no luck. Here is the xpath given to me by Firefox:</p>
  
  <pre><code>/html/body/p[3]/table/tbody/tr/td/table/tbody/tr[3]
  </code></pre>
  
  <p>Using it as- is throws the error: "<em>Value cannot be null. Parameter name: source.</em>"</p>
  
  <p>This occurs on line:</p>
  
  <pre><code>nodeList = htmlDoc.DocumentNode.SelectNodes("/html/body/p[3]/table/tbody/tr/td/table/tbody/tr[3]").ToList();
  </code></pre>
  
  <p>I'll continue to read, in the meantime if this is an easy fix to anyone, I'd appreciate a tip.</p>
  
  <p>Update: This is the actual code:</p>
  
  <pre><code>protected override List&lt;IDataPoint&gt; ReturnDataPointsFromIndividualAddressString(string AddressString)
  {
         List&lt;IDataPoint&gt; earningsAnnouncements = new List&lt;IDataPoint&gt;(); //Not used, yet..
  
         HtmlWeb hwObject = new HtmlWeb();
         HtmlDocument htmlDoc = hwObject.Load(AddressString);
  
         if (htmlDoc.DocumentNode != null)
         {
                 List&lt;HtmlNode&gt; nodeList = new List&lt;HtmlNode&gt;();
                 nodeList = htmlDoc.DocumentNode.SelectNodes("/html/body/p[3]/table/tbody/tr/td/table/tbody/tr[3]").ToList();
         }
  }
  </code></pre>