I have a datagrid:
<mx:DataGrid id="resultsDataGrid"
height="328" width="604" paddingRight="0" editable="false" y="43" horizontalCenter="0">
<mx:columns>
<mx:DataGridColumn headerText="Title" dataField="title"/>
<mx:DataGridColumn headerText="Updated" dataField="updated"/>
</mx:columns>
</mx:DataGrid>
I also have a REST service returning an xml file in the following format:
<feed xmlns="http://www.w3.org/2005/Atom">
<title></title>
<link href=""/>
<link rel="" href=""/>
<updated></updated>
<author>
<name></name>
</author>
<id></id>
<entry>
<title></title>
<link href=""/>
<id></id>
<updated></updated>
<published></published>
<summary></summary>
<author>
<name></name>
</author>
<category term="" label=""/>
<category term="" scheme=""/>
</entry>
</feed>
Now, all of those fields are populated when its returned but to keep it simpler to see I've removed the values.
I have an HTTPService trying to populate it, with the following result function:
private function searched(event:ResultEvent):void
{
var result:XML = XML(event.result);
//summaryText.text = result.toXMLString();
//Alert.show(result.children().children().children().toString() + "hey");
resultsDataGrid.dataProvider = result.entry;
}
I only need the Title and Updated fields to actually be loaded into the DataGrid. This clearly doesn't work, so I've come asking for help, if anyone has experience and can tell me how to arrange it correctly, I'd appreciate it. (I think it's related to result.entry, that it must be something else like result.feed.entry, but I've tried a number of combinations and they haven't worked - unless I simply haven't hit the right one.)