次の RSS フィードがあり、他の RSS フィードに関する情報があり、最終的にはデータがあります。ユーザーがRSSフィードを選択すると(ルートRSSフィードの子RSSフィードを名前で表示したい)、選択したRSSフィードに関する情報が表示されます。
http://www.espncricinfo.com/ci/content/rss/feeds_rss_cricket.html
public static void Read(string url)
{
WebClient webClient = new WebClient();
webClient.DownloadStringCompleted += webClient_DownloadStringCompleted;
webClient.DownloadStringAsync(new Uri( url));
}
static void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
XDocument document = XDocument.Parse(e.Result);
//return (from descendant in document.Descendants("item")
// select new RssNews()
// {
// Description = descendant.Element("description").Value,
// Title = descendant.Element("title").Value,
// PublicationDate = descendant.Element("pubDate").Value
// }).ToList();
}
以下のコードを試しましたが、例外が表示されます。これを修正する方法はありますか?
タイプ 'System.Reflection.TargetInvocationException' の例外が System.ni.dll で発生しましたが、ユーザー コードでは処理されませんでした