我对使用XSL完全不熟悉,所以如果有任何我忽略的信息,请告诉我.
我的XSLT文件中有一个字符串,我可以这样显示:
<xsl:value-of select="@Description/>
Run Code Online (Sandbox Code Playgroud)
它显示,在浏览器中呈现,如:
<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>
Run Code Online (Sandbox Code Playgroud)
我能做些什么来得到这个字符串呈现为HTML,这样<div></div>的结果在换行,"给了我",并 给了我一个空间?
我可以详细说明我已经尝试过但没有奏效的事情,但我不知道这是否相关.
Ben*_*ard 17
我想你要设置以下属性:
<xsl:value-of select="@Description" disable-output-escaping="yes"/>
Run Code Online (Sandbox Code Playgroud)