How to remove <p> tag from string in xslt?

632 views Asked by At

I am getting <p> tag in my string . I want to remove the <p> and </p> from string .is it possible in xslt ?

here is my code http://xsltransform.net/ehVYZNv

   <xsl:variable name="bb">&lt;p&gt;Former Indian cricketer Sachin Tendulkar, who is an avid lover of Tennis, posted this cute picture with his wife Anjali Tendulkar at the Wimbledon’s semi-final match. He also wished Roger Federer all the best for the match. (Photo: Instagram)&lt;/p&gt;
          </xsl:variable>

        =====
<xsl:value-of select="$bb" disable-output-escaping="yes"/>

Expected output

Former Indian cricketer Sachin Tendulkar, who is an avid lover of Tennis, posted this cute picture with his wife Anjali Tendulkar at the Wimbledon’s semi-final match. He also wished Roger Federer all the best for the match. (Photo: Instagram

1

There are 1 answers

0
Rupesh_Kr On BEST ANSWER

you can use substring for that in xslt 1.0

<xsl:value-of select="substring-before(substring-after($bb, '&lt;p&gt;'), '&lt;/p&gt;')" disable-output-escaping="yes"/>