当前位置: 代码迷 >> ASP.NET >> 50分请问一个xsl的有关问题,超急
  详细解决方案

50分请问一个xsl的有关问题,超急

热度:1770   发布时间:2013-02-25 00:00:00.0
50分请教一个xsl的问题,在线等,超急!!!!!!!!!!!
xml中有以下一个节点:
<RC> 你累不累啊&lt;br   /&gt; </RC>

而用xsl转换时,输出是:
你累不累啊 <br   />

而我想要的结果是,不要显示 <br   /> ,而是换行!有没有什么办法????


------解决方案--------------------------------------------------------
<RC> 你累不累啊 <br /> </RC>

------解决方案--------------------------------------------------------
你需要使用HttpUtility.HtmlDecode
------解决方案--------------------------------------------------------
<RC> 你累不累啊 <br /> </RC>
------解决方案--------------------------------------------------------
我不累

顶起
------解决方案--------------------------------------------------------
顶起!
------解决方案--------------------------------------------------------
原来你是要不转成HTML啊 这个简单,在XSL里加上这个
<xsl:output
method = "xml " | "html " | "text " | QName
version = nmtoken
encoding = string
omit-xml-declaration = "yes " | "no "
standalone = "yes " | "no "
doctype-public = string
doctype-system = string
cdata-section-elements = QNames
indent = "yes " | "no "
media-type = string
/>

------解决方案--------------------------------------------------------
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
------解决方案--------------------------------------------------------
把 <br/> 代换成\r\n
  相关解决方案