I'm building an AIR app with Flex 3. The current version gets
some XML data over HTTP using an HTTPService and, since the result
comes down as an Array of objects, dumps it into an ArrayCollection
before passing it to the UI. I want to move that particular data
set into a local XML file that will be bundled in the app itself,
with minimal code change.
I expected this to be easy but it's proving extremely
difficult. Using the File and FIleStream objects I can generate an
XML object, but there's no easy way to turn that into an
ArrayCollection that I can see. I tried turning it into an XMLList
and then an XMLListCollection, but even after inspecting it in Flex
Builder I can't figure out how to address it properly, and indeed
the innards still seem to be XML objects rather than XMLLists or
To be more specific about that last point: my XML file has a
root object named feed, with a number of entry objects inside it.
After turning it into an XML object and inspecting it, I see a
<feed> object inside the XML object, with a bunch of
<entry> objects inside that. But when I turn it into an
XMLListCollection I can't figure out how to address the array of
<entry> objects. Every permutation I've tried failed.
And even setting that aside, much of my existing code assumes
an ArrayCollection object with an array source...so ideally I'd
love a way just to take the local XML file and turn it into the
same ArrayCollection it turned into when accessed as an