SyndicationItem::AttributeExtensions Property
Gets the attribute extensions for the syndication item.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: property Dictionary<XmlQualifiedName^, String^>^ AttributeExtensions { virtual Dictionary<XmlQualifiedName^, String^>^ get() sealed; }
Property Value
Type: System.Collections.Generic::Dictionary<XmlQualifiedName^, String^>^A dictionary that contains a collection of attribute extensions.
The Syndication object model allows you to add custom attributes to a SyndicationItem instance. When serialized for Atom 1.0, the custom attribute is written to an <entry> element. When serialized for RSS 2.0, the custom attribute is written to an <item> element. For a complete example that shows how to add an attribute extension, see the Loosely-Typed Extensions Sample sample.
The following code shows how to add an attribute extension to a syndication feed.
The following XML code shows an Atom 1.0 serialization of a SyndicationItem instance with a custom attribute called itemAttrib.
<link rel="alternate" href="http://someserver/MyItem" /> <content type="text">This is some content</content>
The following code shows the same SyndicationItem instance serialized as RSS 2.0.
<item p4:itemAttrib="ItemAttribValue" xmlns:p4="http://FeedServer/tags"> <link>http://someserver/MyItem</link> <link>http://alternate/Link</link> <source>MyFeed</source> <link>http://someserver/MyItem</link> <author>jesper@contoso.com</author> <description>this is a summary for my item</description> <a10:content type="text">This is some content</a10:content> </item>
Available since 3.5
Silverlight
Available since 2.0