title: How to select a td that has class "foo"?
body: <p>I'm using HtmlAgilityPack and I'd like to select the value from inside the td with class <code>title</code>.  I need the value <code>Battlefield 3</code> which is inside the <code>&lt;a&gt;</code> tag.</p>
  
  <p>I've tried the following, just to get the correct td element, and I get an exception <code>object is not set to an instance</code>.</p>
  
  <pre><code>var title = from item in document.DocumentNode.Descendants()
              where item.Name == "td" &amp;&amp; item.Attributes["class"].Value == "title"
              select item.InnerHtml;
  </code></pre>
  
  <p>With this small example, I'll probably figure out the rest of what I need.</p>
  
  <p>Thank you for the suggestions.</p>
  
  <pre><code>&lt;tr class="first-in-year"&gt;
    &lt;td class="year"&gt;2011&lt;/td&gt;
  
    &lt;td class="img"&gt;&lt;a href="/battlefield-3/61-27006/"&gt;&lt;img src=
    "http://media.giantbomb.com/uploads/6/63038/1700748-bf3_thumb.jpg" alt=""&gt;&lt;/a&gt;&lt;/td&gt;
  
    &lt;td class="title"&gt;
      &lt;a href="/battlefield-3/61-27006/"&gt;Battlefield 3&lt;/a&gt;
  
      &lt;p class="deck"&gt;Battlefield 3 is DICE's next installment in the franchise and
      will be on PC, PS3 and Xbox 360. The game will feature jets, prone, a
      single-player and co-op campaign, and 64-player multiplayer (on PC). It's due out
      in Fall of 2011.&lt;/p&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>