You can split up the XML into a couple strings and concatenate them together
to work around the compiler.  Something like this:

var doc:XML= new XML("<SAMPLE><INFO><![CDATA[Cool stuff about Unicorns in
Unicode text here.]"+"]>"+"</INFO></SAMPLE>");


- Daniel Freiman

On Wed, Aug 13, 2008 at 2:44 PM, Keith <[EMAIL PROTECTED]> wrote:

>   When I declare an inline XML object in the actionscript of my MXML
> document,
> how do I keep the compiler from throwing errors when I have CDATA in my
> XML?
> (The <mx:Script> already uses CDATA for actionscript)
>
> private function init():void
> {
> var doc:XML=
> <SAMPLE>
> <INFO><![CDATA[Cool stuff about Unicorns in Unicode text here.]]></INFO>
> </SAMPLE>;
>
> Alert.show(doc.toXMLString());
> }
>
> -- Keith H --
> www.keith-hair.net
>
>  
>

Reply via email to