What do you get when you trace myData.getItemAt(0)? That will return null if it isn't an XML. You can do this too:
trace("CHECK : " + (myData.getItemAt(0) is XML)); You can check to see if it is an XMLList too, but I thought looking at it, it seemed like a flat xml. On Wed, Jul 2, 2008 at 1:32 PM, Stephen More <[EMAIL PROTECTED]> wrote: > Thats what I was thinking but when I try: > > var myXML:XML; > myXML = myData.getItemAt(0) as XML; > trace( "DEBUG: " + myXML ); > > I get > DEBUG: null > > > On Wed, Jul 2, 2008 at 2:30 PM, Sean Clark Hess <[EMAIL > PROTECTED]<seanhess%40gmail.com>> > wrote: > > Each row is an xml object... > > > > So, (myData.getItemAt(i) as XML).children() > > > > Then you could loop through the children and ask them for their name. > After > > the as XML step you can do anything you can normally do with the XML > object > > > > On Wed, Jul 2, 2008 at 12:11 PM, Stephen More <[EMAIL > > PROTECTED]<stephen.more%40gmail.com> > > > > wrote: > >> > >> ( Example code taken from: > >> http://livedocs.adobe.com/flex/201/html/charts_intro_108_12.html ) > >> Here is the dataset I am trying to work with: > >> > >> <data> > >> <result month="Jan-04"> > >> <apple>81768</apple> > >> <orange>60310</orange> > >> <banana>43357</banana> > >> </result> > >> <result month="Feb-04"> > >> <apple>81156</apple> > >> <orange>58883</orange> > >> <banana>49280</banana> > >> </result> > >> </data> > >> > >> The flex code will look like this: > >> <mx:HTTPService > >> id="srv" > >> url="../assets/data.xml" > >> useProxy="false" > >> result="myData=ArrayCollection(srv.lastResult.data.result)" > >> /> > >> > >> How can I interrogate the ArrayCollection named myData so that it will > >> return apple, orange, and banana ? > >> I am not looking to get the numerical values, I want to get the xml > name. > >> > >> -Thanks > >> Steve More > > > > > >