SyndicationItem Class
Represents a feed item, for example an RSS <item> or an Atom <entry>.
Assembly: System.ServiceModel.Web (in System.ServiceModel.Web.dll)
When serialized to Atom 1.0, a SyndicationItem instance is written to an <entry> element. The following table shows how each property defined for SyndicationItem is serialized for Atom 1.0.
SyndicationItem property | Serialized form |
|---|---|
Attribute in the <entry> element. | |
An <author> element for each author in the collection. | |
A<category> element. | |
A<content> element. | |
A<contributor> element for each contributor in the collection. | |
A<rights> element. | |
Element in the <entry> element. | |
An <id> element. | |
An <updated> element. | |
A <link> element for each link in the collection. | |
A <published> element. | |
A <source> element. | |
A <summary> element. | |
A <title> element. |
When serialized to RSS 2.0, a SyndicationItem instance is written to an <item> element. The following table shows how each property defined for SyndicationItem is serialized for RSS 2.0.
SyndicationItem property | Serialized form |
|---|---|
Attribute in the <item> element. | |
A <managingEditor> if only one SyndicationPerson is in the Authors collection; otherwise, the <a10:author> element for each author in the collection. | |
A <category> element. | |
An <a10:content> element. | |
An <a10:contributor> element for each SyndicationPerson in the Contributors collection. | |
A <copyright> element. | |
Element in the <item> element. | |
An <a10:id> element. | |
An <a10:updated> element. | |
A <link> element for each SyndicationLink in the Links collection. | |
A <pubDate> element. | |
A <source> element. | |
A <description> element. | |
A <title> element. |
The following code shows how to use the SyndicationItem class.
Dim item As SyndicationItem = New SyndicationItem("My Item", "This is some content", New Uri("http:' SomeServer/MyItem"), "Item ID", DateTime.Now) item.Authors.Add(New SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http:' contoso/jesper")) item.Categories.Add(New SyndicationCategory("Category One")) item.Contributors.Add(New SyndicationPerson("lene@contoso.com", "Lene Aaling", "http:' contoso/lene")) item.Copyright = New TextSyndicationContent("Copyright 2007") item.Links.Add(New SyndicationLink(New Uri("http:' OtherServer/Item"), "alternate", "Alternate Link", "text/html", 1000)) item.PublishDate = New DateTime(2007, 2, 23) item.Summary = New TextSyndicationContent("this is a summary for my item") Dim xqName As XmlQualifiedName = New XmlQualifiedName("itemAttrib", "http:' FeedServer/tags") item.AttributeExtensions.Add(xqName, "ItemAttribValue") Dim feed As SyndicationFeed = New SyndicationFeed() Dim items As Collection(Of SyndicationItem) = New Collection(Of SyndicationItem)() items.Add(item) feed.Items = items
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.