I need to tranform HTML table Indesign code xml table



I need to tranform HTML table Indesign code xml table as like below. Any help would be appreaciated


Input XML



<table>
<tbody>
<tr>
<td align="left">1</td>
<td align="center">82.58</td>
<td align="center">9.30</td>
<td align="center">18.36</td>
<td align="center">13.85</td>
<td align="center">4.51</td>
</tr>
<tr>
<td align="left">2</td>
<td align="center">142.19</td>
<td align="center">19.94</td>
<td align="center">26.20</td>
<td align="center">18.73</td>
<td align="center">7.46</td>
</tr>
<tr>
<td align="left">3</td>
<td align="center">89.00</td>
<td align="center">5.98</td>
<td align="center">15.98</td>
<td align="center">11.88</td>
<td align="center">4.10</td>
</tr>
<tr>
<td align="left">4</td>
<td align="center">29.32</td>
<td align="center">2.09</td>
<td align="center">5.61</td>
<td align="center">4.40</td>
<td align="center">1.21</td>
</tr>
</tbody>
</table>


Required Ouput



<Table aid:table="table" aid:trows="4" aid:tcols="6" aid5:table="DataTable">
<Cell aid5:cellstyle="TB_First" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">1</Cell>
<Cell aid5:cellstyle="TB_First" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">82.58</Cell>
<Cell aid5:cellstyle="TB_First" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">9.30</Cell>
<Cell aid5:cellstyle="TB_First" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">18.36</Cell>
<Cell aid5:cellstyle="TB_First" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">13.85</Cell>
<Cell aid5:cellstyle="TB_First" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">4.51</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">2</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">142.19</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">19.94</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">26.20</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">18.73</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">7.46</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">3</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">89.00</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">5.98</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">15.98</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">11.88</Cell>
<Cell aid5:cellstyle="TB_Middle" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">4.10</Cell>
<Cell aid5:cellstyle="TB_Last" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">4</Cell>
<Cell aid5:cellstyle="TB_Last" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">29.32</Cell>
<Cell aid5:cellstyle="TB_Last" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">2.09</Cell>
<Cell aid5:cellstyle="TB_Last" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">5.61</Cell>
<Cell aid5:cellstyle="TB_Last" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">4.40</Cell>
<Cell aid5:cellstyle="TB_Last" aid:table="cell" aid:crows="1" aid:ccols="1" aid:pstyle="TableText">1.21</Cell>

</Table>

No comments:

Post a Comment