gpt4 book ai didi

html - 带有 HTML 实体的 XSLT 字符串 - 如何让它呈现为 HTML?

转载 作者:技术小花猫 更新时间:2023-10-29 12:48:59 24 4
gpt4 key购买 nike

我对使用 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  &quot;Hello World&quot; and sometimes whitespaces.&nbsp;</div>

我该怎么做才能将此字符串呈现为 html,以便 <div></div>结果换行,&quot;给我" , 和 &nbsp;给我一个空间?

我可以详细说明我已经尝试过但没有奏效的事情,但我不知道这是否相关。

最佳答案

我想你想这样设置以下属性:

<xsl:value-of select="@Description" disable-output-escaping="yes"/>

关于html - 带有 HTML 实体的 XSLT 字符串 - 如何让它呈现为 HTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2853924/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com