We Recommend

Essential ActionScript 3.0 Essential ActionScript 3.0
The book focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.


Posted By

chrisaiv on 01/25/08


Tagged

php xml cdata as3


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

gismo
robobobo


Create CDATA tags between XML nodes using AS


Published in: ActionScript 3 


URL: http://www.moorwind.com/read.php?45

I found this snippet which I think originally came from the Flex Cookbook website: http://www.adobe.com/cfusion/communityengine/index.cfm?event=homepage&productId=2


  1. function cdata(theURL:String):XML
  2. {
  3. var x:XML = new XML("<![CDATA[" + theURL "]]>");
  4. return x;
  5. }
  6. <the_url>{cdata("http://some.com?var=someval&foo=bar")}</the_url>

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: robobobo on July 3, 2008

var x:XML = new XML("");

second + was missing

Posted By: robobobo on July 3, 2008

var x:XML = new XML("");

second + was missing

You need to login to post a comment.