Mega Code Archive

 
Categories / Flash ActionScript / XML
 

Create the XML structure with a string

package{   import flash.display.Sprite;      public class Main extends Sprite{     public function Main(){         var str:String = "<gamescore><username>username </username>"                        + "<score>111</score></gamescore>";                  // Pass the string to the constructor to create an XML object         var example:XML = new XML( str );     }   } }