Represents a link within a syndication feed or item. This class encapsulates information in the /rss/channel/link or /rss/channel/item/link element in RSS 2.0 or the atom:link element in Atom 1.0.
Syntax
var syndicationLink = new Windows.Web.Syndication.SyndicationLink(uri); var syndicationLink = new Windows.Web.Syndication.SyndicationLink(uri, string, string, string, uInt32); var syndicationLink = new Windows.Web.Syndication.SyndicationLink();
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- ActivatableAttribute(Windows.Web.Syndication.ISyndicationLinkFactory, NTDDI_WIN8)
- DualApiPartitionAttribute()
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
Members
The SyndicationLink class has these types of members:
Constructors
The SyndicationLink class has these constructors.
| Constructor | Description |
|---|---|
| SyndicationLink() | Creates a new SyndicationLink object. |
| SyndicationLink(Uri) | Creates a new SyndicationLink with a Uri. |
| SyndicationLink(Uri, String, String, String, UInt32) | Creates a new SyndicationLink object with a Uri, Relationship, Title, MediaType, and Length. |
Methods
The SyndicationLink class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
| Method | Description |
|---|---|
| GetXmlDocument | Generates the DOM object that represents this element, all the attributes and child elements including foreign markups. The only formats accepted by this method are Atom 1.0 and RSS 2.0. |
Properties
The SyndicationLink class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the list of custom attributes of the element. | |
| Read/write | Gets or sets the base URI for the element. This property represents the xml:base attribute on the element. It may be inherited from an ancestor element. | |
| Read-only | Gets the list of child elements within the element. | |
| Read/write | Gets or sets the language of the element. This property represents the xml:lang attribute on the element. It may be inherited from an ancestor element. It must be valid according to XML 1.0. | |
| Read/write | Gets or sets the length of the linked resource, in bytes. | |
| Read/write | Gets or sets the media type of the linked resource. The string must have the pattern .+/.+. | |
| Read/write | Gets or sets the local name of the element. | |
| Read/write | Gets or sets the namespace of the element. | |
| Read/write | Gets or sets the text content of the element. If the element contains only child elements, this property is NULL. | |
| Read/write | Gets or sets the relationship type of the link. | |
| Read/write | Gets or sets the language of the resource pointed to by the Uri property. This property represents the hreflang attribute on atom:link. It must adhere to the pattern defined by RFC 3066. | |
| Read/write | Gets or sets the title of the syndication link. | |
| Read/write | Gets or sets the URI of the linked resource. |
Remarks
The following table maps SyndicationLink properties to RSS and Atom feed elements.
| SyndicationLink | RSS | Atom |
|---|---|---|
| Length | length (attribute) | |
| MediaType | type (attribute) | |
| Relationship | rel (attribute) | |
| Title | title (attribute) | |
| Uri | (node value) | href (attribute) |
| ResourceLanguage | hreflang (attribute) |
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps, desktop apps] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps, desktop apps] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012