I have an HTML page which has only one <table>
tag but many <tr>
and <td>
tags.
Example:
<tr attributes >
<td>Name1</td>
<td>some text</td>
<td>some text</td>
</tr> 1.
<tr>
<td>some text</td>
<td>--------</td>
<td>some text</td>
<td>some text</td>
</tr>
<tr>
<td>Total</td>
<td>--------</td>
<td>1989</td>
<td>some text</td>
</tr>
------------------------------------------------------------------------------
<tr attributes >
<td>Name2</td>
<td>some text</td>
<td>some text</td>
</tr>
<tr>
<td>some text</td>
<td>--------</td>
<td>some text</td>
<td>some text</td>
</tr>
<tr>
<td>some text</td>
<td>--------</td>
<td>some text</td>
<td>some text</td>
</tr>
<tr>
<td>Total</td>
<td>--------</td>
<td>1979</td>
<td>some text</td>
</tr>
------------------------------------------------------------------------------
<tr attributes >
<td>Name3</td>
<td>some text</td>
<td>some text</td>
</tr> 2.
<tr>
<td>some text</td>
<td>--------</td>
<td>some text</td>
<td>some text</td>
</tr>
<tr>
<td>Total</td>
<td>--------</td>
<td>1089</td>
<td>some text</td>
</tr>
Now suppose I want the rows between NAME1 and the following TOTAL and NAME3 and the following TOTAL.
There can be any number of rows and columns between this...
The size of rows and column is not fixed.
So the output should include 1.
and 2.