Macro to count and add specific XML tag
Hello,
I’ve been looking but haven’t found a solution yet.
If anyone can guide me to a solution or has a solution it would be greatly appreciated.
I need a macro to select a certain file path with a lot of XML files and modify them all at once by creating a loop to add and differentiate certain XML opening tags.
For example the before XML file would have tags like this.
<table> Certain information here…
</table>
<table> Certain information here…
</table>
<table> Certain information here…
</table>
I need the macro to change it to this:
<table id=“TAB0001”> Certain information here…
</table>
<table id=“TAB0002”> Certain information here…
</table>
<table id=“TAB0003”> Certain information here…
</table>
<table id=“TAB0004”> Certain information here…
</table>
When it gets to the 10th table if it could remove a 0 instead of adding one.
For example it would be
<table id=“TAB0010”> Certain information here…
</table>
Etc…
Any help would be great. Thank you in advance.
|