I have a feeling there is a problem with me not dealing with the 
default namespace correctly.  My XML is being returned with a 
default namespace: "xmlns="http://myapi.myurl.com/";.  I'm not sure 
how to either remove this namespace or reference before i create my 
XMLListCollection (see my code in 1st post). 

I have seen some examples where people have 

 namespace myNameSpace = "http://myapi.myurl.com/";;
 use namespace myNameSpace;

But i'm not sure what to do with this code.

thanks,
Ted


--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> 
wrote:
>
> Does your trace show what you expect?  What is not working?
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of tedgies
> Sent: Wednesday, January 16, 2008 5:34 PM
> To: [email protected]
> Subject: [flexcoders] Binding deeper XML to datagrid
> 
>  
> 
> 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/
> <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