Thanks for the quick response.  

I know its possible to loop over the XMLList, but I am not sure how to
do it. I have used the XMLListCollection, but then when I try to use
the XMLListCollection as a data provider I have use the "@" symbol as
you suggested below.

Using the "@" cause more problems because when try to make my app
dynamic I have to try things like [EMAIL PROTECTED]) and it gets
messy when I have to try to capitalize things like
[EMAIL PROTECTED]({somevar}).


So if you could help with how to loop through the XMLList it would
make my code much cleaner.  

Thanks, J

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> You can loop over the XMLList and build that ArrayCollection.
> 
>  
> 
> Alternatively, you could use an XMLListCollection and do:
> 
> var xlcBills:XMLListCollection = new
> XMLListCollection(myXMLBillsList.month.bill)
> 
> ...no loop required.  A labelField spec might be:@name or @Amount. 
> 
>  
> 
> I don't do charts yet so you are on your own there.
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of jnewport
> Sent: Thursday, October 19, 2006 12:13 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] array of arrays and XML
> 
>  
> 
> Hoping to figure this out. What I am trying to do is get a result like
> this (ArrayCollection).
> 
> public var expenses:ArrayCollection = new ArrayCollection([
> {Expense: "Taxes", Amount: 106976},
> {Expense: "Rent", Amount: 147776},
> {Expense: "Car", Amount: 79554},
> {Expense: "Gas", Amount: 39252},
> {Expense: "Food", Amount: 128351}
> 
> from this XML:
> 
> <list>
> 
> <month monthname="Jan-04" income="14000263" average="80052">
> <bill name="Taxes" Amount="106976" customers="25670"/>
> <bill name="Rent" Amount="147776" customers="25670"/>
> <bill name="Car" Amount="79554" customers="25670"/>
> <bill name="Gas" Amount="39252" customers="25670"/>
> <bill name="Food" Amount="128351" customers="25670"/>
> </month>
> 
> </list>
> 
> Then use it to plot data on a piechart. I am pulling the xml in via a
> httpservice. So I am guessing I need to iterate through the xml and
> create an arrayCollection of arrays? But I can't figure that out. 
> Then how to use the Expenses:arrayCollection as a piechart dataprovider.
> 
> Thanks in advance.
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to