E4X means that XML is pretty much read like an Array.
So the data you mentioned would be accessed as follows:
var xml:XML = [this is the variable that contains your XML];
trace(xml.file[0].text); //returns file name 1
trace(xml.file[1].text); //returns file name 2
you can also loop through with a for each
for each (var i:XML in xml.file)
{
trace(i.text);
}
This is presuming AS3.
There is definitely a way to do it with AS2, using nextSibling, but I
can't remember off the top of my head.
2008/6/20 ACE Flash <[EMAIL PROTECTED]>:
> hey there, I was using loop to push them into Array....
>
> Is there a way to convert this XML file into Array more easily? like =>
> xml as Array?
>
> <files>
> <file>file name1</file>
> <file>file name2</file>
> <file>file name3</file>
> .....
> </files>
>
>
> var
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
Random Lines 3D
My online portfolio
www.therandomlines.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders