最好的方式来阅读RSS提要.NET中使用C# [英] Best Way to read rss feed in .net Using C#
问题描述
什么是阅读RSS源的最佳方式。
what is the best way to read rss feeds.
我使用的XmlTextReader实现这一目标。是否有任何其他做最好的办法。
I am using XmlTextReader to achieve this. Is there any other best way to do it.
XmlTextReader reader = new XmlTextReader(strURL);
DataSet ds = new DataSet();
ds.ReadXml(reader);
使用XmlTextReader的阅读RSS源后,有没有什么办法,我可以将数据以列表项,而不是数据集?
after reading the rss feed using XmlTextReader is there any way i can that data to list item instead of dataset?
推荐答案
的 System.ServiceModel.Syndication
命名空间有一些东西给你,即<一个href=\"http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed.aspx\">SyndicationFeed类。
The System.ServiceModel.Syndication
namespace has some stuff for you, namely the SyndicationFeed class.
这是一个相当简单的例子。
<一href=\"http://blogs.msdn.com/b/steveres/archive/2008/01/20/using-syndicationfeed-to-displaying-photos-from-spaces-live-com.aspx\">http://blogs.msdn.com/b/steveres/archive/2008/01/20/using-syndicationfeed-to-displaying-photos-from-spaces-live-com.aspx
This is a fairly simple example. http://blogs.msdn.com/b/steveres/archive/2008/01/20/using-syndicationfeed-to-displaying-photos-from-spaces-live-com.aspx
这篇关于最好的方式来阅读RSS提要.NET中使用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!