If you can align the tags vertically, you can use the Column Editor for numbering. Let's say you format the XML as follows:
<MEDIA><MEDIA_ID></MEDIA_ID></MEDIA> <MEDIA><MEDIA_ID></MEDIA_ID></MEDIA> .... <MEDIA><MEDIA_ID></MEDIA_ID></MEDIA>
Now place the cursor between the start and end tags of MEDIA_ID . Select Column Editor... in the Edit menu (shortcut ALT + C). Change the switch to Number to Insert with a starting value of 1001 increasing by 1 (Decimal). Confirm your selection with OK. You should end up with:
<MEDIA><MEDIA_ID>1001</MEDIA_ID></MEDIA> <MEDIA><MEDIA_ID>1002</MEDIA_ID></MEDIA> .... <MEDIA><MEDIA_ID>1199</MEDIA_ID></MEDIA>
Unfortunately, it seems that these operations cannot be used in a macro. But maybe that helps.
source share