I need to test a software enhancement I made recently. To do this, I need to make 1000 changes in 56 xml loader files (so 56,000 total). Specifically, I need to change the following:
</users>
</service>
into this
</users>
<rules>
<ruleid="13e77ade-f15c-433f-aac8-2fdaf2d867a5" />
</rules>
<temprestriction />
</service>
I could do a find/replace on each of the 56 files, but that would be tedious. Is there a good way to automate this process? Thanks in advance.
Like @ConradFrix mentioned in a comment: you can use different tools/methods to solve this problem.
Here is a solution based on XSLT. The code is not tested extensively.
Key points: 1) using an identity template to recursively copy nodes of the document 2) a separate template to add new elements after
<users>element if it is a last child of a<service>element.