我的字符串中得到了<p>
标签。我想从字符串中删除<p>
和</p>
.在 xslt 中可以吗?
这是我的代码 http://xsltransform.net/ehVYZNv
<xsl:variable name="bb"><p>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)</p>
</xsl:variable>
=====
<xsl:value-of select="$bb" disable-output-escaping="yes"/>
预期产出
前印度板球运动员Sachin Tendulkar是网球的狂热爱好者,他在温布尔登半决赛中与妻子Anjali Tendulkar发布了这张可爱的照片。他还祝愿罗杰·费德勒在比赛中一切顺利。(照片:Instagram
您可以在XSLT 1.0中使用子字符串
<xsl:value-of select="substring-before(substring-after($bb, '<p>'), '</p>')" disable-output-escaping="yes"/>