Hi,

I don't think you can...

In the help docs they have this example

for each (var item in doc.p)
{
  trace(item);
}

I would say you are going to have to bite the bullet and loop.
ArrayCollection is just a wrapped array and I don't see any  place where
XMLList returns and array. It's like mixing apples and oranges.

Although XMLList looks like an array it isn't.

Peace, Mike

On 1/25/07, Danko Kozar <[EMAIL PROTECTED]> wrote:

  Have you tried:

myDP = xmlData.partsList.catalog as ArrayCollection;

?

--- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
"helihobby" <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I have XML data which comes back from a server via a custom socket.
> How can I convert that the to an ArrayCollection ?
>
> If I try:
>
> myDP = new ArrayCollection();
> myDP = ArrayCollection(xmlData.partsList.catalog);
>
> I get a runtime error the XML List collection can not be converted
to
> an array collection.
>
> I know I can do a for loop and re-build it but I was wondering if
there
> is a quick qay to do it.
>
> I know the HTTPService can do it with the result inline tag which
will
> convert the XML data to an Array Data provider but I am not using
it. I
> am using Sockets.
>
> Thank you for all the help,
>
> Sean.
>




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to