Using XSLT, how can one remove all the text nodes from HTML, but keep the element tags, attribute names, and attribute values?
<table id="preserve-this-value">
<caption>Lose this text node</caption>
Transformation:
<table id="preserve-this-value">
<caption></caption>
Thanks 🙂
Use this template:
It copies all nodes (elements, attributes) except text nodes.