I have markup which I would like to remove/transform certain tags from, but retain the data.
For example this:
<div>This is some <b>bold</b> text inside of a div</div>
<p>This is <u>another <b>formatted</b></u> string...<br /></p>
should become this:
<p>This is some <b>bold</b> text inside of a div</p>
<p>This is another <b>formatted</b> string...</p>
Using apply-templates to match each condition doesn’t work due to nesting.
How would you go about doing this?
Sounds like a job for a modified identity transform, like this: