以下のURLから類似のアーティストの名前を取得し、リストボックスに表示したいと思います。
http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist= ARTISTNAMEHERE&api_key = ff1629a695c346cc4b2dd1c41fcd4054
ここで他の人の質問から遠く離れて、私はXMLファイルを読むためにこれを持っています:
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
WebClient wc = new WebClient();
wc.DownloadStringCompleted += HttpCompleted;
wc.DownloadStringAsync(new Uri("http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=ARTISTNAMEHERE&api_key=ff1629a695c346cc4b2dd1c41fcd4054"));
}
private void HttpCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
{
XDocument xdoc = XDocument.Parse(e.Result, LoadOptions.None);
// do something with the XDocument here
}
}
前に言ったように、名前ノードのそれぞれであるそのページからアーティスト名を取得し、それらをリストボックスに表示したいと思います。どうすればこれを行うことができますか?