Hi there Keith The problem in the concatenation is this you're trying to pass an special character into a compiler time. So, to figure out you could try this one.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ private function testMethod():String { var ndv:String="Some text I wrote"; ndv = "<"+"!"+ "[CDATA[" + ndv + "]]"+ ">"; return ndv; } ]]> </mx:Script> </mx:Application> Regards Igor Costa www.igorcosta.org On 3/13/07, khos2007 <[EMAIL PROTECTED]> wrote:
Problem: The String concatenation at the "ndv" variable causes a compile error. How can I build a String with CDATA tag without an error? Purpose: To build XML String at runtime. Thanks for any advice, -- Keith -- See code below: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ private function testMethod():String { var ndv:String="Some text I wrote"; ndv = "<![CDATA[" + ndv + "]]>"; return ndv; } ]]> </mx:Script> </mx:Application>
-- ---------------------------- Igor Costa www.igorcosta.org www.igorcosta.com skype: igorpcosta

