RSS Parser

The RssParser class allows you to parse a RSS content String into a RSS Schema.

Example

public async void ParseRSS()
{
    string feed = null;
    RSSFeed.Clear();

    using (var client = new HttpClient())
    {
        try
        {
            feed = await client.GetStringAsync("https://visualstudiomagazine.com/rss-feeds/news.aspx");
        }
        catch { }
    }

    if (feed != null)
    {
        var parser = new RssParser();
        var rss = parser.Parse(feed);

        foreach (var element in rss)
        {
            Console.WriteLine($"Title: {element.Title}");
            Console.WriteLine($"Summary: {element.Summary}");
        }
    }
}

Classes

Class Purpose
Microsoft.Toolkit.Parsers.Rss.RssParser Parser for Parsing RSS Strings into RSS Schema.
Microsoft.Toolkit.Parsers.Rss.RssSchema Schema for Parsing RSS.

RssParser

Methods

Methods Return Type Description
Parse(string) IEnumerable<RssSchema> Parse an RSS content string into RSS Schema.

Sample Code

RSS Parser Sample Page Source.

You can see this in action in UWP Community Toolkit Sample App.

Requirements

Implementation .NET Standard 1.4.
Namespace Microsoft.Toolkit.Parsers
NuGet package Microsoft.Toolkit.Parsers

API Source Code