SyndicationLink Class

Definition

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.

public ref class SyndicationLink sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Syndication.ISyndicationLinkFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SyndicationLink final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Syndication.ISyndicationLinkFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class SyndicationLink final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Syndication.ISyndicationLinkFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SyndicationLink
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Syndication.ISyndicationLinkFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SyndicationLink
function SyndicationLink(uri, relationship, title, mediaType, length)
Public NotInheritable Class SyndicationLink
Inheritance
Object Platform::Object IInspectable SyndicationLink
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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)

Constructors

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.

Properties

AttributeExtensions

Gets the list of custom attributes of the element.

BaseUri

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.

ElementExtensions

Gets the list of child elements within the element.

Language

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.

Length

Gets or sets the length of the linked resource, in bytes.

MediaType

Gets or sets the media type of the linked resource. The string must have the pattern ".+/.+".

NodeName

Gets or sets the local name of the element.

NodeNamespace

Gets or sets the namespace of the element.

NodeValue

Gets or sets the text content of the element. If the element contains only child elements, this property is NULL.

Relationship

Gets or sets the relationship type of the link.

ResourceLanguage

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 .

Title

Gets or sets the title of the syndication link.

Uri

Gets or sets the URI of the linked resource.

Methods

GetXmlDocument(SyndicationFormat)

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.

Applies to

See also