Updated: (things are more complicated including blocks, which I didn't explain from the start, but I understand that this should work with regex or something)
How to parse HTML blocks to a table layout for every not empty tag? As an example, this HTML:
<p class="block1">
<span class="styleclass2">
<span class="styleclass25">
<strong>
<u></u>Some Text Here
</strong>
<br>
</span>
</span>
<span class="styleclass5">
<u>
<a href="http://www.example.com">www.example.com</a>
</u>
</span>
<br>
<span class="styleclass24">Some Text Here</span>
</p>
<p class="block2">
<span class="styleclass2">
<span class="styleclass25">
<strong>
<u></u>Some Text Here2
</strong>
<br>
</span>
</span>
<span class="styleclass5">
<u>
<a href="http://www.example2.com">www.example2.com</a>
</u>
</span>
<br>
<span class="styleclass24">Some Text Here2</span>
</p>
and make these:
<table>
<tr>
<td>Some Text Here</td>
<td>www.example.com</td>
<td>Some Text Here</td>
</tr>
<tr>
<td>Some Text Here2</td>
<td>www.example2.com</td>
<td>Some Text Here2</td>
</tr>
</table>
The main idea is how to group this blocks to make a row for every block found...