title: Java Equivalent for HTML::TableExtract
body: <p>Can anyone please suggest a library for Java which is similar to perl module <a href="http://cpan.uwinnipeg.ca/htdocs/HTML-TableExtract/HTML/TableExtract.pm.html" rel="nofollow">HTML::TableExtract</a>. The one of the noted feature of this module is it can helps the user to identify the nested tables easily by using depth and count. I used some libraries like JSoup, HTML parser and HTML Unit. But till now I don't anything close to the HTML::TableExtract module. So can anyone here please suggest me some equivalent to this module in Java if any? Because what i am trying to do is searching for the keyword in every tables and if it is present i am going to extract table. In case of nested tables, i want to extract only the table that as the keyword not the parent table also. Thanks in advance</p>
  
  <p>@Łukasz Rżanek please consider the below HTML code </p>
  
  <pre><code>&lt;html&gt;
  &lt;table border=3 cellpadding=10&gt;
  &lt;tr&gt;
    &lt;td valign=top&gt;
      Content 1
    &lt;/td&gt;&lt;td&gt;
      Content 2&lt;p&gt;
  
      &lt;table border=1&gt;
      &lt;tr&gt;
        &lt;td&gt;Content 3&lt;/td&gt;
        &lt;td&gt;Content 4&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;Content 5&lt;/td&gt;
        &lt;td&gt;Content 6&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/table&gt;&lt;p&gt;
  
      Content 7
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here I want to extract only the table which contains Content 3. How can I do that using JSoup?</p>