我有以下 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.ni.dll 中出现“System.Reflection.TargetInvocationException”类型的异常,但未在用户代码中处理