主頁 > 知識庫 > 把 CDATA 中的內(nèi)容(有可能是不規(guī)范的Html代碼)以Html方式展現(xiàn)出來。

把 CDATA 中的內(nèi)容(有可能是不規(guī)范的Html代碼)以Html方式展現(xiàn)出來。

熱門標簽:荒野大鏢客2地圖標注怎么變中文 沈陽智能外呼系統(tǒng)排名 移動400辦理電話 北川縣地圖標注 蘇州通信外呼系統(tǒng)多少錢 中國地圖標注各省份 武漢人工外呼系統(tǒng) 山西旅游景地圖標注 上古卷軸5地圖標注mod
前不久我寫過 XML+XSL 與 Html 的結(jié)合 文章,之后有人問我如何把 CDATA 中的內(nèi)容以Html方式展現(xiàn)出來(尤其是用戶寫的Html不規(guī)范)。本來想寫個范例,后來到Google上一查,發(fā)現(xiàn)已經(jīng)有人寫了。就在: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.

標簽:陽泉 喀什 邯鄲 遼源 海東 南充 東莞 濱州

巨人網(wǎng)絡通訊聲明:本文標題《把 CDATA 中的內(nèi)容(有可能是不規(guī)范的Html代碼)以Html方式展現(xiàn)出來。》,本文關鍵詞  把,CDATA,中的,內(nèi)容,有可能,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權(quán)與本站無關。
  • 相關文章
  • 下面列出與本文章《把 CDATA 中的內(nèi)容(有可能是不規(guī)范的Html代碼)以Html方式展現(xiàn)出來?!废嚓P的同類信息!
  • 本頁收集關于把 CDATA 中的內(nèi)容(有可能是不規(guī)范的Html代碼)以Html方式展現(xiàn)出來。的相關信息資訊供網(wǎng)民參考!
  • 推薦文章