国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

把 CDATA 中的內容(有可能是不規范的Html代碼)以Html方式展現出來。

2020-10-23 18:41:08
字體:
來源:轉載
供稿:網友
前不久我寫過 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.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 长乐市| 长海县| 英德市| 舒兰市| 宜君县| 互助| 酉阳| 沁源县| 改则县| 凤台县| 佛冈县| 武定县| 长岭县| 盈江县| 广南县| 改则县| 蒙自县| 花垣县| 旺苍县| 三门县| 柏乡县| 平昌县| 临江市| 通河县| 聊城市| 临泽县| 长春市| 古田县| 文登市| 东山县| 东丰县| 邮箱| 漾濞| 镇宁| 洪雅县| 新竹市| 安图县| 西华县| 阆中市| 文登市| 榆树市|