I need an XSL solution to replace XML nodes with new nodes.
Say I have the following existing XML structure:
<root>
<criteria>
<criterion>AAA</criterion>
</criteria>
</root>
And I want to replace the one criterion node with:
<criterion>BBB</criterion>
<criterion>CCC</criterion>
<criterion>DDD</criterion>
So that the final XML result is:
<root>
<criteria>
<criterion>BBB</criterion>
<criterion>CCC</criterion>
<criterion>DDD</criterion>
</criteria>
</root>
I have tried using substring-before and substring-after to just copy the first half of the structure, then just copy the second half (in order to fill in my new nodes in between the two halves) but it appears that the substring functions only recognize text in between the nodes' tags, and not the tags themselves like I want them to. :( :(
Any other solutions?