SyndicationFeed 類別

定義

包含摘要的相關信息。 這個類別會將資訊封裝在 RSS 2.0 中的 /rss/channel 元素或 Atom 1.0 中的 atom:feed 元素中。

public ref class SyndicationFeed sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Syndication.ISyndicationFeedFactory, 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 SyndicationFeed 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.ISyndicationFeedFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class SyndicationFeed final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Syndication.ISyndicationFeedFactory), 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 SyndicationFeed
[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.ISyndicationFeedFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SyndicationFeed
function SyndicationFeed(title, subtitle, uri)
Public NotInheritable Class SyndicationFeed
繼承
Object Platform::Object IInspectable SyndicationFeed
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

下表將 SyndicationFeed 屬性對應至 RSS 和 Atom 摘要元素。

SyndicationFeed RSS 通道 Atom 摘要
作者 managingEditor 編寫
類別 category category
參與者 貢獻
Generator 產生器 產生器
IconUri icon
Id id
LastUpdatedTime lastBuildDate 已更新
權限 著作權 權限
副標題 description subtitle
標題 title title
項目 item entry
連結 link link
ImageUri image 標誌
FirstUri 連結與 rel=“first”
LastUri 連結與 rel=“last”
NextUri 連結與 rel=“next”
PreviousUri 連結與 rel=“previous”
SourceFormat

建構函式

SyndicationFeed()

建立新的 SyndicationFeed 物件。

SyndicationFeed(String, String, Uri)

使用 TitleSubtitleUri 建立新的 SyndicationFeed 物件。

屬性

AttributeExtensions

取得專案的自定義屬性清單。

Authors

取得專案的作者。 這個屬性代表 atom:entry 下所有 atom:author 元素的集合。

BaseUri

取得或設定專案的基底 URI。 這個屬性代表 元素上的 xml:base 屬性。 它可以繼承自上階元素。

Categories

取得摘要類別的集合。 這個屬性代表 atom:feed 下所有 atom:category 元素的集合。

Contributors

取得摘要參與者的集合。 這個屬性代表 atom:feed 下所有 atom:contributor 元素的集合。

ElementExtensions

取得 專案內的子項目清單。

FirstUri

取得序列中第一個統一資源標識碼 (URI) 。 這個屬性代表具有屬性 rel=“first”atom:link 元素。

Generator

取得或設定摘要的產生器。 這個屬性代表 RSS 2.0 中的 atom:generator 元素或產生器元素。

IconUri

取得或設定摘要影像的統一資源標識碼 (URI) 。 這個屬性代表 atom:icon 元素。

Id

取得或設定新聞訂閱摘要的標識碼。

ImageUri

取得或設定摘要標誌的統一資源標識碼 (URI) 。 此屬性代表 RSS 2.0 中的 atom:logo 元素或 image/uri 元素。

Items

取得摘要中的專案集合。 這個屬性代表 atom:entry 元素的集合,或 RSS 2.0 中的項目專案集合。

Language

取得或設定 項目的語言。 這個屬性代表 元素上的 xml:lang 屬性。 它可以繼承自上階元素。 它必須根據 XML 1.0 有效。

LastUpdatedTime

取得或設定上次修改摘要的時間。 此屬性代表 /rss/channel/lastBuildDateatom:updated 元素。

LastUri

取得序列中最後一個統一資源標識碼 (URI) 。 這個屬性代表具有屬性 rel=“last”atom:link 元素。

Links

取得摘要相關連結。 這個屬性代表 atom:feedatom:link 元素的集合。 在 RSS 2.0 中,這會對應至 連結 元素。

NextUri

取得序列中下一個統一資源標識碼 (URI) 。 這個屬性代表具有屬性 rel=“next”atom:link 元素。

NodeName

取得或設定專案的本機名稱。

NodeNamespace

取得或設定 專案的命名空間。

NodeValue

取得或設定 專案的文字內容。 如果專案只包含子專案,則此屬性為 NULL。

PreviousUri

取得序列中先前的統一資源標識碼 (URI) 。 這個屬性代表具有屬性 rel=“previous”atom:link 元素。

Rights

取得或設定摘要許可權的相關信息。 此屬性代表 RSS 2.0 中的 atom:rights 元素或 copyright 元素。

SourceFormat

取得源文檔的格式。 如果未從檔載入物件,此屬性會 傳回SyndicationFormat_Atom10

Subtitle

取得或設定摘要的子標題。 此屬性代表 RSS 2.0 中的 atom:subtitle 元素或 description 元素。

Title

取得或設定新聞訂閱摘要的標題。

方法

GetXmlDocument(SyndicationFormat)

產生代表這個專案的 DOM 物件,包括外部標記的所有屬性和子專案。 這個方法唯一接受的格式是 Atom 1.0RSS 2.0

Load(String)

從指定的摘要字串初始化 物件,此字串可以是 RSS 2.0Atom 1.0 格式。

LoadFromXml(XmlDocument)

從指定的 DOM 物件初始化 SyndicationFeed 物件,該物件可以包含 *RSS 2.0 * 或 Atom 1.0 格式的 XML 內容。

適用於

另請參閱