There's a great tutorial at
http://www.kirupa.com/developer/flashcs3/using_xml_as3_pg1.htm

Pretty easy to follow and I found it useful for getting my head around E4X.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of ACE Flash
Sent: 19 March 2009 17:11
To: Flash Coders List
Subject: [Flashcoders] A very simply question of XML toString()

Hey there,

I was trying to parse the XML to get all value of <title> and store them
into array at once. Do I have to use loop to push them into an Array or
there is a shortcut for doing this?

I'd like to get something like this...

var arr:Array = new Array();

// to trace arr
arr[0] = Dictionary 1
arr[1] = Dictionary 2

Thank you



   1. var myXML:XML =
   2.   <order>
   3.           <book>
   4.                   <title>Dictionary 1</title>
   5.           </book>
   6.           <book>
   7.                   <title>Dictionary 2</title>
   8.           </book>
   9.   </order>;
   10. trace( myXML.book.title.toString() )
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to