Hi Gaurav,
This is kind of a pain, but you can convert XML to an ArrayCollection of
Objects like this:
public function result( event : Object ) : void
{
public var abcAC : ArrayCollection = new ArrayCollection();
var abcXMLList : XMLList = XMLList(XML(event.result).abc);
for each(var abcNode:XML in abcXMLList)
{
var abc:Object = new Object();
[EMAIL PROTECTED]();
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ();
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ();
abcAC.addItem(abc);
}
abcXMLList = null;
}
-TH
--- In [email protected], "gaurav1146" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am using a HTTPService which has resultFormat as e4x. I need to
> convert the XML obtained to an ArrayCollection containing objects. I
> tried this:
>
> var ac:ArrayCollection = new ArrayCollection([(event.result.abc as
> XML).children()]);
>
> This gives me an array collection of XML objects. But, I need an array
> collection of Objects. Is there any ways I could get that.
>
> Also, I cant use the resultFormat="object", as in my XML I have two
> sets of Data. The first one needs an e4x format and for the second one
> I need to get an ArrayCollection of Objects.
>
> Any help would be greatly appreciated.
>
> Regards,
> Gaurav
>