Yeah, that really is better.  I just have used the bracket notation for so
much longer than e4x that I forget.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Amy
Sent: Friday, June 05, 2009 9:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: reference xml using variable dynamically

 






--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Tracy Spratt" <tr...@...> wrote:
>
> Try:
> 
> for each(var item:Object in nutritionXML[carousel].itemdata)
>

Another syntax that's more reliable and understandable is:

for each (var item:XMLList in nutritionXML.child(carousel).child(itemdata))
{
//stuff
}



Reply via email to