title: HTML Agility Pack issue finding divs
body: <p>I'm trying to extract everything that resides within a div with a certain class/id name. I'm using the following code:</p>
  
  <pre><code>var webGet = new HtmlWeb();
  var document = webGet.Load("http://www.4guysfromrolla.com/articles/011211-1.aspx");
  
  var partOfWebpage = from completeWebpage in document.DocumentNode.Descendants("div")
                               where
                                   completeWebpage.Attributes["class"].Value == "content" &amp;&amp;
                                   completeWebpage.Attributes["class"].Value != null
                               select completeWebpage.InnerHtml;
  
  foreach (var s in partOfWebpage)
  {
      textBox1.AppendText(s);
  }
  </code></pre>
  
  <p>I'm recieving an <strong>"NullReferenceException was unhandled - Object reference not set to an instance of an object"</strong> error.</p>
  
  <p>Apparently it doesn't find the div at all. When I put "table" instead of "div" in the Descendants() method everthing works fine and I am able to pick a table of my choice with the class/id definition.</p>
  
  <p>What am I doing wrong?</p>
  
  <hr>