Display the content in CDATA (potentially nonstandard HTML code) in HTML. _ Experience Exchange

Source: Internet
Author: User
Tags cdata xsl
I recently wrote a combination of xml+xsl and HTML, and then someone asked me how to put the contents of CDATA in HTML (especially the user-written HTML specification). Originally wanted to write an example, and then to Google on a search, found that someone has written. Right here: http://java.blogger.cn/wuyu/posts/1460.aspx


Note: XSL's disable-output-escaping= "yes"

The core is the use of disable-output-escaping= "yes"

It is described on MSDN as follows:

Disable-output-escaping
Default is "no". If the value is "yes", a-text node generated by instantiating the element would be output without any escaping. For example, the following generates the single character "<".
<
Note?? Disable-output-escaping= "Yes" can used to generate non-well-formed documents, and thus should is used with caution, BEC Ause non-well-formed output may generate errors in certain circumstances. For example, transformNodeToObject to a XML document requires that the result is well-formed and thus may not complete if Disable-output-escaping has affected the well-formedness of the document. Consider disable-output-escaping= "yes" an advanced feature to being used only when the potential dangers is understood.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.