I need to remove a value from an element, but preserve the element itself in the output XML as an empty element.
My input file:
<a>
<b>TEXT1
<c>123</c>
<d>qwe</d>
<e>rty</e>
</b>
<b>TEXT2
<c>345</c>
<d>iop</d>
<e>jkl</e>
</b>
</a>
The output file should retain element c, but the numbers in the element should be gone.
<a>
<b>TEXT1
<c></c>
<d>qwe</d>
<e>rty</e>
</b>
<b>TEXT2
<c></c>
<d>iop</d>
<e>jkl</e>
</b>
</a>
See Question&Answers more detail:os