Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 3
    Then why "ý" is not allowed in CDATA? Commented Jul 13, 2013 at 5:19
  • 16
    @bjan - What makes you think that's an illegal character? Sounds like you might have an encoding problem. Commented Jul 13, 2013 at 5:21
  • I opened the doc in IE, i am also using MSXML parser which declared it as an invalid character. I have an xsd in which it is declared as "type="xs:string"". Is it related with encoding or xml version? Commented Jul 13, 2013 at 5:42
  • 1
    So we could use CDATA to smuggle some HTML into the XML document, so that the HTML doesn't confuse the XML document structure, and then use XSLT later to pull it out and spit it into a HTML document that is being output. Commented Oct 3, 2013 at 6:10
  • 1
    @RichardJPLeGuen I'm doing this very thing now, in a mailing list archiver I'm patching. The HTML comes from an e-mail and so could be garbage with broken tags etc. XSLT will treat the CDATA just as a string. When XSLT inserts that text into the output document, you have to disable escaping, oherwise it will turn into escaped HTML code, not markup. That is, < will become &lt; and so on. Commented Oct 3, 2013 at 18:27