我对使用 XSL 完全陌生,所以如果有任何我遗漏的信息,请告诉我。
我的 XSLT 文件中有一个可以像这样显示的字符串:
<xsl:value-of select="@Description/>
它显示在浏览器中,如下所示:
<div>I can't do anything about the html entities existing in the text.</div> <div>This includes quotes, like "Hello World" and sometimes whitespaces. </div>
我该怎么做才能将此字符串呈现为 html,以便 <div></div>
结果换行,"
给我"
, 和
给我一个空间?
我可以详细说明我已经尝试过但没有奏效的事情,但我不知道这是否相关。
最佳答案
我想你想这样设置以下属性:
<xsl:value-of select="@Description" disable-output-escaping="yes"/>
关于html - 带有 HTML 实体的 XSLT 字符串 - 如何让它呈现为 HTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2853924/