Hi FlexCoders,

I'm trying to show the items from XML below in a datagrid, but the 
only examples i've seen show how to deal with XML items that are not 
as "deep" as the one below.  So, basically it's not working out.  Is 
this a syntax issue, or do i need to cycle through my xml and create 
a new object or arraycollection?

My syntax for setting up the binding is:

<Begin Actionscript>

[Bindable]
public var XMLListSearchResults:XMLListCollection = new 
XMLListCollection();

public function handleSearchService(myEvent:ResultEvent):void {
XMLListSearchResults.source = new XMLList(myEvent.result); 
trace (XMLListSearchResults.child(1).children());
datagrid_results.dataProvider=(XMLListSearchResults.child(1).children
());

</End Actionscript>


My XML structured like this:

<?xml version="1.0" encoding="utf-8" ?> 
 <mySearchResponse xmlns="http://myapi.myurl.com/";>
    <status>
       <statusCode>OK</statusCode> 
    </status>
    <SearchResults>
       <totalResults>531</totalResults> 
       <returnedResults>1</returnedResults> 
       <offset>0</offset>
       <item>
       <title>Moby Dick</title>
       <author>Melville, Herman</author>
       </item>
       <item>
       <title>Pelican Brief</title>
       <author>Grisham, John</author>
       </item>
   </SearchResults>
 </mySearchResponse>

thanks,
Ted

Reply via email to