国产探花免费观看_亚洲丰满少妇自慰呻吟_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.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 收藏| 岳普湖县| 镇康县| 永胜县| 萍乡市| 弋阳县| 宣威市| 沅江市| 松滋市| 宁城县| 资中县| 洛南县| 若尔盖县| 望城县| 武隆县| 嘉定区| 荆门市| 噶尔县| 新民市| 菏泽市| 上栗县| 肇州县| 山东省| 常熟市| 寻乌县| 扶沟县| 桂阳县| 平潭县| 昌邑市| 抚远县| 仁怀市| 灌阳县| 乡城县| 临邑县| 会东县| 鞍山市| 康定县| 文山县| 桂林市| 桐城市| 军事|