我試圖通過httpservice的結果循環,它是xml。循環通過xml結果
這是我如何嘗試這樣做的,但這不起作用。我錯過了什麼?
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();
}
}
,這是結果在調試器:
所有節點:
您能否提供一個xml樣本? – Taurayi
創建手錶表達式'artistList.artists',結果會是什麼? –