相关疑难解决方法(0)

在ASP.NET Core 1.0 RC2中使用RSS的正确方法

使用C#中的ASP.Net Core 1.0(RC2)从RSS源获取数据的正确/最佳方法是什么?

我想从我的Wordpress博客处理RSS提要中的数据,这是https://blogs.msdn.microsoft.com/martinkearn/feed/

我知道在ASP.net 4.x中,你会使用RssReader或者SyndicationFeed我找不到ASP.net核心的等价物.

这是我得到的返回原始feed但我不知道如何从中提取数据.我想枚举这些项目,title然后description从每个项目中获取

    var feedUrl = "https://blogs.msdn.microsoft.com/martinkearn/feed/";
    using (var client = new HttpClient())
    {
        client.BaseAddress = new Uri(feedUrl);
        var responseMessage = await client.GetAsync(feedUrl);
        var responseString = await responseMessage.Content.ReadAsStringAsync();
    }
Run Code Online (Sandbox Code Playgroud)

rss asp.net-core-mvc asp.net-core asp.net-core-1.0

14
推荐指数
2
解决办法
3681
查看次数