title: HTML Agility Pack - using XPath to get a single node - Object Reference not set to an instance of an object
body: <p>this is my first attempt to get an element value using HAP. I'm getting a null object error when I try to use InnerText.</p>
  
  <p>the URL I am scraping is :-
      <a href="http://www.mypivots.com/dailynotes/symbol/659/-1/e-mini-sp500-june-2013" rel="noreferrer">http://www.mypivots.com/dailynotes/symbol/659/-1/e-mini-sp500-june-2013</a>
  I am trying to get the value for current high from the Day Change Summary Table.</p>
  
  <p>My code is at the bottom. Firstly, I would just like to know if I am going about this the right way? If so, then is it simply that my XPath value is incorrect?</p>
  
  <p>the XPath value was obtained using a utility I found called htmlagility helper. The firebug version of the XPath below, also gives the same error :- 
      /html/body/div[3]/div/table/tbody/tr[3]/td/table/tbody/tr[5]/td[3]</p>
  
  <p>My code :-</p>
  
  <pre><code>WebClient myPivotsWC = new WebClient();
  string nodeValue;
  string htmlCode = myPivotsWC.DownloadString("http://www.mypivots.com/dailynotes/symbol/659/-1/e-mini-sp500-june-2013");
  HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
  doc.LoadHtml(htmlCode);
  HtmlNode node = doc.DocumentNode.SelectSingleNode("/html[1]/body[1]/div[3]/div[1]/table[1]/tbody[1]/tr[3]/td[1]/table[1]/tbody[1]/tr[5]/td[3]");
  nodeValue=(node.InnerText);
  </code></pre>
  
  <p>Thanks,
  Will.</p>