0
<lfm status="ok">
<artists user="Ewout1" page="1" perPage="50" totalPages="36" total="1766">
<artist>
<name>Have Heart</name>
<playcount>2582</playcount>
<tagcount>0</tagcount>
<mbid>e519e012-e1a3-4592-b3f6-5a16227ab654</mbid>
<url>http://www.last.fm/music/Have+Heart</url>
<streamable>1</streamable>
<image size="small">http://userserve-ak.last.fm/serve/34/36974461.jpg</image>
<image size="medium">http://userserve-ak.last.fm/serve/64/36974461.jpg</image>
<image size="large">http://userserve-ak.last.fm/serve/126/36974461.jpg</image>
<image size="extralarge">http://userserve-ak.last.fm/serve/252/36974461.jpg</image>
<image size="mega">
http://userserve-ak.last.fm/serve/_/36974461/Have+Heart+s+final+show+of+thei.jpg
</image>
</artist>
...
</lfm>
我有一個httpservice,返回此xml文件。我想要做的是將藝術家的所有名字都放在一個Arraylist中。這是我的代碼,但它不起作用,搜索沒有幫助我。結果對象arrayList
private var arArtists:ArrayList;
arArtists = event.result.artists.artist.name;
您可以嘗試遍歷每個名稱並逐個添加它們。 – ToddBFisher