0
votes

I have the following XML file:

<table-wrap id="tab">
</table-wrap>
<table-wrap id="tab">
</table-wrap>
<table-wrap id="tab">
</table-wrap> 

I want to append to the attribute values the following incremental number from 0 to nth number:

<table-wrap id="tab0">
</table-wrap>
<table-wrap id="tab1">
</table-wrap>
<table-wrap id="tab-nth number">
</table-wrap> 

I want to use xmlstarlet to achieve this. Need help. Cheers Ofuuzo