View Single Post
  #1 (permalink)  
Old May 31st, 2006, 10:25 AM
omrieliav omrieliav is offline
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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>

Reply With Quote