我想变换(与jquery.xslt.js)XML是在文本节点保存标签。 XML是什么样子:
<example>
<text>
Some text with <br /> and <img src="source" /> then text ....
</text>
</example>
我希望有:
<div class="example">
<p>Some text with <br /> and <img src="source" /> then text ....</p>
</div>
如果我使用<xsl:value-of select="."/>
我会得到
"Some text with and then text ...."
如果我添加<xsl:apply-templates />
我会得到
"Some text with and then text .... <br/><img src="source" />"
有没有什么办法来准确改写标签的内容?