I'm not that familiar with XMLListCollection, but presumably the
advantage of using it if you're starting with XML is in not having to
convert your data to another form.

 

Gordon Smith

Adobe Flex SDK Team

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of sdl1326
Sent: Thursday, August 21, 2008 8:59 PM
To: [email protected]
Subject: [flexcoders] Re: XMLList to ArrayCollection

 

Honestly, I do not know as I have not worked with XMLListCollections.
I just need to be able to access the data easily and have only used
Array Collections. It looks like an XMLListCollection might work. Is
there a benefit of using one over the other?
--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Could you use an XMLListCollection instead of an ArrayCollection?
> 
> 
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Tracy Spratt
> Sent: Thursday, August 21, 2008 4:52 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: RE: [flexcoders] XMLList to ArrayCollection
> 
> 
> 
> Sure, but you have to do it manually. Loop over the nodes, then use
the
> attributes() to loop over the attributes. If I recall correctly,
> attribute[n] will give you the attr value, and attribute[n].name()
will
> give you the attr name. XML.name() (or localName()) will give you the
> name of the node.
> 
> 
> 
> Tracy
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of sdl1326
> Sent: Thursday, August 21, 2008 5:56 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] XMLList to ArrayCollection
> 
> 
> 
> I am retrieving the following xml via httpsService with the result
> format being 'e4x'. 
> 
> <projects>
> <project date="08/01/08" description="Development" hours="4"
> user="AA">Q3</project>
> <project date="08/01/08" description="Development" hours="3"
> user="AA">Q4</project>
> <project date="08/04/08" description="Development" hours="4"
> user="AA">Q3</project>
> <project date="08/04/08" description="Development" hours="3"
> user="BB">Q4</project>
> <project date="08/05/08" description="Refinement" hours="6"
> user="BB">Q3</project>
> <project date="08/06/08" description="Refinement" hours="3"
> user="CC">Q3</project>
> <project date="08/07/08" description="Development" hours="2"
> user="CC">Q3</project>
> <project date="08/08/08" description="Development" hours="2"
> user="CC">Q3</project>
> </projects> 
> 
> What's the best way to convert an XMLList to an ArrayCollection? Is it
> possible to do so without knowing the names of the attributes?
> 
> Thanks for the assistance.
>

 

Reply via email to