The content in CDATA (possibly non-standard Html code) is displayed in Html format. _ Experience exchange

Source: Internet
Author: User
The content in CDATA (possibly non-standard Html code) is displayed in Html format. Recently I wrote a combination of XML + XSL and Html, and someone asked me how to display the content in CDATA in Html format (especially the Html written by users is not standard ). I wanted to write an example, and then I went to Google to check it and found someone already wrote it. In: http://java.blogger.cn/wuyu/posts/1460.aspx


Note: xsl disable-output-escaping = "yes"

Its core is to use disable-output-escaping = "yes"

The description on MSDN is as follows:

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 statements, and thus shocould 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.

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.