主页 > 知识库 > 把 CDATA 中的内容(有可能是不规范的Html代码)以Html方式展现出来。

把 CDATA 中的内容(有可能是不规范的Html代码)以Html方式展现出来。

热门标签:荒野大镖客2地图标注怎么变中文 沈阳智能外呼系统排名 移动400办理电话 北川县地图标注 苏州通信外呼系统多少钱 中国地图标注各省份 武汉人工外呼系统 山西旅游景地图标注 上古卷轴5地图标注mod
前不久我写过 XML+XSL 与 Html 的结合 文章,之后有人问我如何把 CDATA 中的内容以Html方式展现出来(尤其是用户写的Html不规范)。本来想写个范例,后来到Google上一查,发现已经有人写了。就在:http://java.blogger.cn/wuyu/posts/1460.aspx


注意:xsl的disable-output-escaping="yes" 

其核心就是利用 disable-output-escaping="yes" 

MSDN 上对它的描述如下:

disable-output-escaping 
Default is "no". If the value is "yes", a text node generated by instantiating the element will be output without any escaping. For example, the following generates the single character "". 

Note?? disable-output-escaping="yes" can be used to generate non-well-formed documents, and thus should be used with caution, because non-well-formed output may generate errors in certain circumstances. For example, transformNodeToObject to an XML document requires that the result be well-formed and thus may not complete ifdisable-output-escaping has affected the well-formedness of the document. Consider disable-output-escaping="yes" an advanced feature to be used only when the potential dangers are understood.

标签:阳泉 喀什 邯郸 辽源 海东 南充 东莞 滨州

巨人网络通讯声明:本文标题《把 CDATA 中的内容(有可能是不规范的Html代码)以Html方式展现出来。》,本文关键词  把,CDATA,中的,内容,有可能,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《把 CDATA 中的内容(有可能是不规范的Html代码)以Html方式展现出来。》相关的同类信息!
  • 本页收集关于把 CDATA 中的内容(有可能是不规范的Html代码)以Html方式展现出来。的相关信息资讯供网民参考!
  • 推荐文章