System.ServiceModel.Syndication 9.0.0

About

Provides types for generating and consuming RSS and Atom feeds. It is used for creating and parsing syndication feeds, making it easier to build and integrate web content syndication.

Key Features

  • Easy generation and parsing of RSS and Atom feeds.
  • Customizable for different syndication needs.
  • Support for both feed reading and writing.

How to Use

Creating a Feed

using System.ServiceModel.Syndication;
using System.Xml;

// Create a new syndication feed
SyndicationFeed feed = new SyndicationFeed(
    "Feed Title",
    "Feed Description",
    new Uri("http://example.com"),
    "FeedID",
    DateTime.Now);

// Add items to the feed
SyndicationItem item1 = new SyndicationItem(
    "Title1",
    "Content1",
    new Uri("http://example.com/item1"));
feed.Items = new List<SyndicationItem> { item1 };

// Serialize the feed to RSS format
using (XmlWriter writer = XmlWriter.Create("rss.xml"))
{
    Rss20FeedFormatter rssFormatter = new Rss20FeedFormatter(feed);
    rssFormatter.WriteTo(writer);
}

Resulting RSS feed:

<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Feed Title</title>
        <link>http://example.com/</link>
        <description>Feed Description</description>
        <lastBuildDate>Sat, 11 Nov 2023 18:05:21 +0100</lastBuildDate>
        <a10:id>FeedID</a10:id>
        <item>
            <link>http://example.com/item1</link>
            <title>Title1</title>
            <description>Content1</description>
        </item>
    </channel>
</rss>

Consuming a Feed

using System.ServiceModel.Syndication;
using System.Xml;

string feedUrl = "https://devblogs.microsoft.com/dotnet/feed/";
using XmlReader reader = XmlReader.Create(feedUrl);

// Read the feed using Atom10FeedFormatter.
SyndicationFeed feed = SyndicationFeed.Load(reader);

Console.WriteLine($"Feed Title: {feed.Title.Text}");
Console.WriteLine("Feed Items:");

// Iterate through the feed items and display the title and a brief summary of each.
foreach (SyndicationItem item in feed.Items)
{
    Console.WriteLine($"Title: {item.Title.Text}");
    Console.WriteLine($"Published Date: {item.PublishDate.DateTime}");
}

/*
 * This code produces the following output:
 *
 * Feed Title: .NET Blog
 * Feed Items:
 * - Title: Join us for the Great .NET 8 Hack
 *   Published Date: 07/11/2023 18:05:00
 * - Title: The convenience of System.IO
 *   Published Date: 06/11/2023 18:05:00
 */

Main Types

The main types provided by this library are:

  • System.ServiceModel.Syndication.SyndicationFeed
  • System.ServiceModel.Syndication.SyndicationItem
  • System.ServiceModel.Syndication.Rss20FeedFormatter
  • System.ServiceModel.Syndication.Atom10FeedFormatter

Additional Documentation

Feedback & Contributing

System.ServiceModel.Syndication is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on System.ServiceModel.Syndication.

Packages Downloads
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
55
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
58
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
65
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
77
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
87
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.
90
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard.
64
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard.
78
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. 10dc31ea70c14a33f371cea5a757a3d95b218acf When using NuGet 3.x this package requires at least version 3.4.
66
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. 8f968b9e79c5721d78cc88e46fe57457fe9d490d When using NuGet 3.x this package requires at least version 3.4.
78
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
56
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
65
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
69
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
71
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
72
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
76
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
81
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
83
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
89

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

  • No dependencies.

.NET 8.0

  • No dependencies.

.NET 9.0

  • No dependencies.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
9.0.0 4 11/16/2024
9.0.0-rc.2.24473.5 5 10/16/2024
9.0.0-rc.1.24431.7 10 09/12/2024
9.0.0-preview.7.24405.7 14 08/16/2024
9.0.0-preview.6.24327.7 11 07/10/2024
9.0.0-preview.5.24306.7 10 06/15/2024
9.0.0-preview.4.24266.19 13 05/24/2024
9.0.0-preview.3.24172.9 9 05/22/2024
9.0.0-preview.2.24128.5 22 03/14/2024
9.0.0-preview.1.24080.9 9 02/26/2024
8.0.0 15 11/19/2023
8.0.0-rc.2.23479.6 11 10/22/2023
8.0.0-rc.1.23419.4 13 09/21/2023
8.0.0-preview.7.23375.6 30 09/11/2023
8.0.0-preview.6.23329.7 14 09/14/2023
8.0.0-preview.5.23280.8 28 07/03/2023
8.0.0-preview.4.23259.5 12 07/03/2023
8.0.0-preview.3.23174.8 47 04/15/2023
8.0.0-preview.2.23128.3 21 03/21/2023
8.0.0-preview.1.23110.8 27 03/17/2023
7.0.0 47 01/23/2023
7.0.0-rc.2.22472.3 68 10/16/2022
7.0.0-rc.1.22426.10 36 09/24/2022
7.0.0-preview.7.22375.6 83 09/12/2022
7.0.0-preview.6.22324.4 79 09/25/2022
7.0.0-preview.5.22301.12 46 09/21/2022
7.0.0-preview.4.22229.4 20 09/25/2022
7.0.0-preview.3.22175.4 43 09/24/2022
7.0.0-preview.2.22152.2 29 10/16/2022
7.0.0-preview.1.22076.8 60 09/25/2022
6.0.2-mauipre.1.22102.15 40 09/25/2022
6.0.2-mauipre.1.22054.8 84 09/23/2022
6.0.0 38 09/21/2022
6.0.0-rc.2.21480.5 67 09/23/2022
6.0.0-rc.1.21451.13 54 09/23/2022
6.0.0-preview.7.21377.19 66 09/22/2022
6.0.0-preview.6.21352.12 37 10/16/2022
6.0.0-preview.5.21301.5 94 09/21/2022
6.0.0-preview.4.21253.7 33 09/25/2022
6.0.0-preview.3.21201.4 41 10/16/2022
6.0.0-preview.2.21154.6 55 09/25/2022
6.0.0-preview.1.21102.12 69 09/21/2022
5.0.0 43 09/24/2022
5.0.0-rc.2.20475.5 33 10/16/2022
5.0.0-rc.1.20451.14 67 10/16/2022
5.0.0-preview.8.20407.11 79 09/22/2022
5.0.0-preview.7.20364.11 77 09/25/2022
5.0.0-preview.6.20305.6 87 10/16/2022
5.0.0-preview.5.20278.1 62 09/22/2022
5.0.0-preview.4.20251.6 39 09/23/2022
5.0.0-preview.3.20214.6 67 09/23/2022
5.0.0-preview.2.20160.6 100 10/16/2022
5.0.0-preview.1.20120.5 48 09/25/2022
4.7.0 37 09/22/2022
4.7.0-preview3.19551.4 61 10/16/2022
4.7.0-preview2.19523.17 69 09/24/2022
4.7.0-preview1.19504.10 101 09/25/2022
4.6.0 70 09/23/2022
4.6.0-rc1.19456.4 28 09/24/2022
4.6.0-preview9.19421.4 65 09/22/2022
4.6.0-preview9.19416.11 78 09/24/2022
4.6.0-preview8.19405.3 61 09/24/2022
4.6.0-preview7.19362.9 57 10/16/2022
4.6.0-preview6.19303.8 59 09/22/2022
4.6.0-preview6.19264.9 18 09/27/2022
4.6.0-preview5.19224.8 35 09/22/2022
4.6.0-preview4.19212.13 33 09/21/2022
4.6.0-preview3.19128.7 36 10/16/2022
4.6.0-preview.19073.11 23 09/24/2022
4.6.0-preview.18571.3 52 09/23/2022
4.5.0 64 09/23/2022
4.5.0-rc1 38 09/22/2022
4.5.0-preview2-26406-04 86 10/16/2022
4.5.0-preview1-26216-02 70 09/26/2022
4.5.0-preview1-25914-04 81 09/26/2022