Example xml is:
<a amp="a"><b><c>this is the text</c></b></a>
Needs to be transformed to:
<a amp="a"><c>this is the text</c></a>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Solution #1: A slight improvement to smaccoun‘s solution that would preserve any attributes on the
celement (not necessary for example XML):Solution #2 Another alternative that leverages the built-in template rules, which apply-templates for all elements and copy all
text():Solution #3: A modified identity transform:
Solution #4 If you know what you want, just copy it from a match on the root node
If you want to simply remove the
<b>element from your input, then a modified identity transform should be used with a template matching the<b>element that simply applies templates to it’s children.