This content has been marked as final. Show 3 replies
The xml standard has no support for nesting of CDATA sections and, as far as I can tell, there is no way to escape the ]]> inside a CDATA section (no other markup is parsed).
Try putting your xml variable definition into an AS class, rather than in your inline script node. There's a recent posting on this forum on the topic - had to do with using '}' inside the xml literal. That has some more detail on how to do it.
so we just can't use CDATA in MXML...? =(
You can use CDATA in MXML - you can't use nested CDATA in XML - any xml, and that includes MXML.
If you don't use CDATA for your script block (I don't recommend this because you need to escape all markup, including your embedded xml literal), then you can use CDATA inside your xml literal. So, you can do this:
var xml:XML = <ConceptNote>
That's not easy to read, but there's your CDATA.
If you put your literal in an .as class, then you don't have the nesting problem.