I’m trying to loop through the results of an httpservice, it is xml.
This is how I try to do it, but this does not work. What am I missing?
protected function getArtistsSucces(event:ResultEvent):void
{
var artistList:XMLList = XMLList(event.result);
var artistXML:XML;
for each(artistXML in artistList.artists)
{
var artistName:String = artistXML.artist.name;
var artistPic:String = artistXML.artist.image.(@size=="large");
insertArtistUrl = "http://localhost:8888/flexapp/insert_artist.php?name=" + artistName + "&pic=" + artistPic
+ "&userid=" + userId;
insertArtistService.send();
}
}
and this is the result in the debugger:

All nodes:

I forgot to add the
to my HTTPService. Adding this resolved the problem.