title: Using ruby and nokogiri to parsing HTML using HTML comments as markers
body: <p>How could I use ruby to extract information from a table consisting of these rows? Is it possible to detect the comments using nokogiri?</p>
  
  <pre><code>&lt;!-- Begin Topic Entry 4134 --&gt; 
      &lt;tr&gt; 
          &lt;td align="center" class="row2"&gt;&lt;image src='style_images/ip.boardpr/f_norm.gif' border='0'  alt='New Posts' /&gt;&lt;/td&gt; 
          &lt;td align="center" width="3%" class="row1"&gt;&amp;nbsp;&lt;/td&gt; 
          &lt;td class="row2"&gt; 
              &lt;table class='ipbtable' cellspacing="0"&gt; 
                  &lt;tr&gt; 
  
  &lt;td valign="middle"&gt;&lt;alink href='http://www.xxx.com/index.php?showtopic=4134&amp;amp;view=getnewpost'&gt;&lt;image src='style_images/ip.boardpr/newpost.gif' border='0'  alt='Goto last unread' title='Goto last unread' hspace=2&gt;&lt;/a&gt;&lt;/td&gt; 
  
                      &lt;td width="100%"&gt; 
                      &lt;div style='float:right'&gt;&lt;/div&gt; 
                      &lt;div&gt; &lt;alink href="http://www.xxx.com/index.php?showtopic=4134&amp;amp;hl="&gt;EXTRACT LINK 1&lt;/a&gt;  &lt;/div&gt; 
                      &lt;/td&gt; 
                  &lt;/tr&gt; 
              &lt;/table&gt; 
              &lt;span class="desc"&gt;EXTRACT DESCRIPTION&lt;/span&gt; 
          &lt;/td&gt; 
          &lt;td class="row2" width="15%"&gt;&lt;span class="forumdesc"&gt;&lt;alink href="http://www.xxx.com/index.php?showforum=19" title="Living"&gt;EXTRACT LINK 2&lt;/a&gt;&lt;/span&gt;&lt;/td&gt; 
          &lt;td align="center" class="row1" width='10%'&gt;&lt;alink href='http://www.xxx.com/index.php?showuser=1642'&gt;Mr P&lt;/a&gt;&lt;/td&gt; 
          &lt;td align="center" class="row2"&gt;&lt;alink href="javascript:who_posted(4134);"&gt;1&lt;/a&gt;&lt;/td&gt; 
          &lt;td align="center" class="row1"&gt;46&lt;/td&gt; 
          &lt;td class="row1"&gt;&lt;span class="desc"&gt;Today, 12:04 AM&lt;br /&gt;&lt;alink href="http://www.xxx.com/index.php?showtopic=4134&amp;amp;view=getlastpost"&gt;Last post by:&lt;/a&gt; &lt;b&gt;&lt;alink href='http://www.xxx.com/index.php?showuser=1649'&gt;underft&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt; 
      &lt;/tr&gt; 
  &lt;!-- End Topic Entry 4134 --&gt;
  --&gt;
  </code></pre>