how to transform xml with xslt preserving <br /> and not preserve other tags in a text

Posted by liysd on Stack Overflow See other posts from Stack Overflow or by liysd
Published on 2010-04-26T16:51:37Z Indexed on 2010/04/26 16:53 UTC
Read the original article Hit count: 286

Filed under:
|
|

This question is quite similar to this one. Except that I want to preserve only <br /> and some <img> tags (with class="visible"). I.e from:

<example>
   <text>
      Some text with <br /> and <img src="source" /> then text .... <img class="visible" src="source" />
   </text>
</example>

To have:

 <div class="example"> 
  <p>Some text with <br /> and then text ....  <img class="visible" src="source" /></p> 
 </div>

© Stack Overflow or respective owner

Related posts about html

Related posts about xslt