Ok, I don't use RemoteObject much myself.
The DataGrid can use a plain XMLList or an XMLListCollection as the dataProvider. Use the collection if you plan to update the dataProvider items programatically. If the column data is deeply nested in the item nodes, you will need to use labelFunction to display them. It the data is in top level properties or the item node(either attributes or immediate child nodes) you can specify dataField Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of lyan_wang2003 Sent: Thursday, September 13, 2007 9:06 PM To: [email protected] Subject: [flexcoders] Re: how can I read an xml with remoteObject When I use remoteObject,there is no resultformat to choose e4x,which is not like httpservice.The fact is I can get xml from coldfusion,but I don't know how to use it in a datagrid as a dataprovider? --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > What the event.result object contains depends o the resultFormat > property setting. Default is object, I advise e4x. > > > > If you are getting xml then you can't cast it directly to > ArrayCollection. You want to either leave it as XML, or use an e4x > expression to return an XMLList, then wrap that in an XMLListCollection > (be sure to use new XMLListCollection(XMLList)) > > > > Note: You can use httpservice with CF, but if you are comfortable with > RemoteObject, that will be faster and more flexible. > > > > Tracy > > > > ________________________________ > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of lyan_wang2003 > Sent: Thursday, September 13, 2007 9:43 AM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] how can I read an xml with remoteObject > > > > up to now I know how to use httpservice to get xml data,but I don't how > to edit an xml.So I change to use remoteObject and Coldfusion,because > coldfusion can edit an xml file using <cffile> file. > It seems I can get xml data from it cause I can see the infor in the > debug window,the whole xml structure.I suppose the event.result is an > XML object.But when I cast it to an arrayCollection,error appears.I > just don't know why!!!! >

