I'm trying to replace the child node names "Layer01", "Layer02" "Layer03", and so on, with "Layer" in an XML document.
In Mule 3 I used:
payload.replaceAll('Layer\\d\\d','Layer')
The logic is to replace the child nodes that start with the string "Layer".
Example input:
<Layers>
<Layer01>
............
............
</Layer01>
<Layer30>
............
............
</Layer30>
....
....
</Layers>
Expected output:
<Layers>
<Layer>
............
............
</Layer>
<Layer>
............
............
</Layer>
....
....
</Layers>
How can I implement this transformation in Mule 4?
Full Input payload : https://github.com/Manikandan99/Map_request/blob/main/input_rating.xml
Full Expected output : https://github.com/Manikandan99/Map_request/blob/main/output_rating.xml