Quantcast
Channel: Adobe Community : Popular Discussions - Using Flash Builder
Viewing all articles
Browse latest Browse all 70427

Using CDATA in Script (XML)

$
0
0

Hello,

 

I'm trying to create an XML var using CDATA to get some htmlText.

 

Sample:

<fx:Script>    <![CDATA[          var newXML:XML = XML("<node><![CDATA["+ myRichTE.htmlText+" ]]></node>")    ]]><fx:Script><mx:RichTextEditor id="myRichTE" />

 

But i get an error on this line. (give it a try, something about an unclosed tag, can't give the exact english error message since i got french UI)

 

It seems that you can't use

<![CDATA[xxxx]]>

in Script section of an Application (in addition of the main CDATA which contains all Script), since it interprets as a real CDATA.

And I think I can't do without it to store the htmlText inside an XML node.

 

Any ideas ?

(maybe by "escaping" the CDATA tag ?)

 

Thanks a lot.


Viewing all articles
Browse latest Browse all 70427

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>