Sort Table Columns by Table Header Attribute
Hi,
Got this XML that should be transformed to HTML table.
Can I sort the columns according to the "index" attribute of the <col> tag
Thanks Much
<table>
<col text="My Col 1" index="2" />
<col text="My Col 2" index="4" />
<col text="My Col 3" index="1" />
<col text="My Col 4" index="3" />
<tr>
<td>My Cell 1</td>
<td>My Cell 2</td>
<td>My Cell 3</td>
</tr>
<tr>
<td>My Cell 10</td>
<td>My Cell 20</td>
<td>My Cell 30</td>
</tr>
<tr>
<td>My Cell 100</td>
<td>My Cell 200</td>
<td>My Cell 300</td>
</tr>
</table>
|