I have a problem where a table has 100s of rows. It causes an issue and needs to be split into several smaller tables with fewer rows each.
My html is valid xml as well.
How can I split the table every x rows into a new table?
And, how can I copy the table style, and first row (header) into each subsequent table.
So something like this
<table class="..." style="...">
<tr>
<td>head 1</td>
<td>head 2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<table>
Becomes
<table class="..." style="...">
<tr>
<td>head 1</td>
<td>head 2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
</table>
<table class="..." style="...">
<tr>
<td>head 1</td>
<td>head 2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
</table>
<table class="..." style="...">
<tr>
<td>head 1</td>
<td>head 2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
</table>
<table class="..." style="...">
<tr>
<td>head 1</td>
<td>head 2</td>
</tr>
<tr>
<td>col1</td>
<td>col2</td>
</tr>
<table>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…