title: Traversing the DOM with HTML Agility Pack
body: <p>I'm having trouble figuring out how to traverse the DOM with HTML Agility Pack.</p>
  
  <p>For example let's say that I wanted to find an element with <code>id="gbqfsa"</code>.</p>
  
  <pre><code>HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
              doc.LoadHtml(Url);
              var foo = from bar in doc.DocumentNode.DescendantNodes()
                            where bar.Attributes["id"].Value == "gbqfsa"
                            select bar.InnerText;
  </code></pre>
  
  <p>Right now I'm doing this (above), but <code>foo</code> is coming out as <code>null</code>.  What am I doing wrong?</p>
  
  <p><strong>EDIT:</strong> This is the <code>if</code> statement I was using.  I was just testing to see if the elements <code>InnerText</code> equaled "Google Search."</p>
  
  <pre><code>if (foo.Equals("Google Search"))
              {
                  HasSucceeded = 1;
                  MessageBox.Show(yay);
              }
              else
              {
                  MessageBox.Show("kms");
              }
              return HasSucceeded;
  </code></pre>