Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Introducing the Windows RSS Platform

Introducing the Windows RSS Platform

This topic introduces the Windows RSS Platform, an API that developers can use to manipulate the Common Feed List, the set of feeds to which the user is subscribed. The properties and methods are categorized to provide a technical overview of the platform and its functionality.

This topic contains the following sections.

Introduction

Really Simple Syndication (RSS) is an XML document format used by Web sites to publish frequently updated content, such as news headlines and blog posts. The distribution is called an RSS feed. In most cases, the RSS feed is retrieved directly from a Web server via HTTP. The RSS specification includes conventions that dictate how often feeds should be checked for updates.

As part of the RSS support in Windows Internet Explorer 7, users can discover and subscribe to RSS feeds within the browser. When the user subscribes to a feed, it is added to the Common Feed List, which is available for clients to use in addition to or instead of their own list. For example, in Microsoft Office Outlook® 2007, the user's subscription list can import feeds from the Common Feed List. This enables the discovery of feeds within Internet Explorer, and then for those discovered feeds to appear in other applications.

The Feed Download Engine downloads feeds and merges the new items with the existing data in the feed store. Using the Windows RSS Platform, applications can then expose the feed data to the user. The RSS Explorer of Windows Vista, for example, provides an excellent text reading experience for news and blog feeds, and Microsoft Windows Media Player enables users to listen to audio feeds. The consumption of feed data varies by application; the Windows RSS Platform makes a variety of scenarios possible by providing easy access to the feed data.

Object Model

The top-level object in the Windows RSS Platform is the FeedsManager object. To create the object for scripting, use the ProgID Microsoft.FeedsManager. To create the object for use with C/C++, call CoCreateInstance with CLSID_FeedsManager (defined in the msfeeds.h header file).

The Windows RSS Platform object model hierarchy is as follows:

Windows RSS Platform Object Model

The Windows RSS Platform supports both styles of Component Object Model (COM) interfaces:

  • Early-bound (vtable) interface—the interface that is better for C/C++ developers. These objects are in the IXFeedsManager hierarchy.
  • Late-bound IDispatch interface—COM Automation interface that is ideal for scripting and managed code (Microsoft Visual Basic .NET and C#). These are the IFeedsManager objects.

To avoid unnecessary repetition, the names of the COM Automation interfaces are used throughout this topic.

Common Feed List

The Common Feed List resembles a hierarchical file system with folders and feeds. The IFeedFolder interface contains properties and methods for accessing feeds contained within the folder as well as properties and methods for accessing subfolders. Because feed folders are mapped to disk directories, folder names are limited to those characters that the file system allows. (See Valid Feed and Folder Names for more information.)

The root folder of the Common Feed List is accessed through the FeedsManager.RootFolder property, which returns an object of type IFeedFolder. From there, each IFeedFolder object contains its own collection of subfolders and feeds. (Refer to the example in Subfolders for a demonstration of a recursive folder search that returns an aggregated total count of feeds.)

The following table lists the methods and properties that are used to traverse and manipulate the Common Feed List hierarchy.

Folder MethodReturnsDescription
FeedsManager.RootFolderIFeedFolderReturns the top-level system feed folder.
FeedFolder.IsRootBooleanReturns true if top-level folder.
FeedFolder.SubfoldersIFeedsEnumReturns collection of subfolders.
FeedsManager.GetFolder(path)IFeedFolderReturns specific folder by path.
FeedFolder.GetSubfolder(name)IFeedFolderReturns specific subfolder.
FeedFolder.NameStringReturns the name of the folder.
FeedFolder.ParentIFeedFolderReturns the parent folder.
FeedFolder.PathStringReturns the feed list path of the folder.
FeedFolder.TotalItemCountIntegerReturns an aggregated total of items in all feeds.
FeedFolder.TotalUnreadItemCountIntegerReturns an aggregated total of unread items in all feeds.
Testing for Folders
FeedsManager.ExistsFolder(path)BooleanReturns true if folder exists.
FeedFolder.ExistsSubfolder(name)BooleanReturns true if subfolder exists.
Managing Folders
FeedFolder.CreateSubfolder(name)IFeedFolderCreates and returns new subfolder.
FeedsManager.DeleteFolder(path) Deletes folder, including its subfolders and feeds.
FeedFolder.Delete Deletes folder, including its subfolders and feeds.
FeedFolder.Move(path) Moves the folder.
FeedFolder.Rename(name) Renames the folder.

Working with Feeds

The IFeed interface exposes the required and optional elements of an RSS feed. To subscribe to a feed, assign it to a folder. The following table lists the methods and properties that are used to manage the feeds.

Feed MethodReturnsDescription
FeedsManager.GetFeed(path)IFeedReturns specific feed, by feed list path.
FeedsManager.GetFeedByUrl(url)IFeedReturns specific feed, if subscribed, by URL.
FeedFolder.GetFeed(name)IFeedReturns specific feed by name.
FeedFolder.FeedsIFeedsEnumReturns collection of feeds.
Feed.NameStringReturns the name of the feed.
Feed.ParentIFeedFolderReturns the parent folder of the feed.
Feed.PathStringReturns the feed list path of the feed.
Testing for Feeds
FeedsManager.ExistsFeed(path)BooleanReturns true if feed exists.
FeedFolder.ExistsFeed(name)BooleanReturns true if feed exists.
FeedsManager.IsSubscribed(url)BooleanReturns true if a feed subscription exists.
Managing Feeds
FeedFolder.CreateFeed(name,url)IFeedCreates feed in folder and subscribes to it.
FeedsManager.DeleteFeed(path) Deletes the feed.
Feed.Delete Deletes the feed.
Feed.Move(path) Moves the feed.
Feed.Rename(name) Renames the feed.

RSS 2.0 Elements

Most of the XML elements of an RSS 2.0 feed are available as read-only properties on the associated objects. Although some channel elements (such as cloud, rating, skipDays, and skipHours) are not available as properties on the IFeed interface, they are still in the XML source for the feed. Additional namespace extensions define properties that are used by the Windows RSS Platform to manage lists.

IFeed

The IFeed interface exposes the properties that are present on the RSS channel element.

Feed ElementsTypeDescription
Feed.CopyrightStringOptional. Returns the channel copyright.
Feed.DescriptionStringRequired. Returns the channel description.
Feed.ImageStringOptional. Returns the URL of the feed logo.
Feed.LanguageStringOptional. Returns the language code for the feed.
Feed.LastBuildDateFloating-point numberOptional. Returns the date of last content change.
Feed.LinkStringRequired. Returns the homepage URL of the feed.
Feed.PubDateFloating-point numberOptional. Returns the publication date for feed content.
Feed.TitleStringRequired. Returns the title of the feed.
Feed.TtlStringOptional. Returns the time to live (TTL) of the feed.
XML Source
Feed.Xml(count,sort,filter,include)StringReturns a new XML document for the feed.
Common Feed List Properties
Feed.DownloadUrlStringReturns URL used for security zone mapping.
Feed.IsListBooleanReturns true if the feed contains list extensions.
Feed.ItemCountIntegerReturns count of items.
Feed.ItemsIFeedsEnumReturns collection of items.
Feed.LastWriteTimeStringReturns the date and time of creation or last modification.
Feed.LocalEnclosurePathStringReturns the system folder where downloaded enclosures are saved.
Feed.LocalIdStringReturns the GUID assigned to the feed.
Feed.MarkAllItemsReadStringSets the read status of all items to true.
Feed.NameStringReturns the name of the feed.
Feed.ParentIFeedFolderReturns the parent folder of the feed.
Feed.PathStringReturns the feed list path of the feed.
Feed.UnreadItemCountIntegerReturns the count of unread items.
Feed.UrlStringReturns the source URL of the feed.

IFeedItem

Individual items in a feed are represented by FeedItem objects. Depending on the type of feed, these items are aggregated as news items that are merged into the feed, or as list items that replace the contents of the previous list. Additional RSS 2.0 item elements, such as GUID and source, are available in the XML source document of the feed.

Item ElementsTypeDescription
FeedItem.AuthorStringOptional. Returns the e-mail address of the author.
FeedItem.CommentsStringOptional. Returns the page URL of related comments.
FeedItem.DescriptionStringRequired. Returns the item synopsis.
FeedItem.GuidStringOptional. Returns the GUID of the item.
FeedItem.LinkStringRequired. Returns the source URL of the item.
FeedItem.ModifiedFloating-point numberOptional. Returns the date and time of last modification.
FeedItem.PubDateFloating-point numberOptional. Indicates the date of the item publication.
FeedItem.TitleStringRequired. Returns the title of the item.
XML Source
FeedItem.Xml(include)StringReturns an XML fragment for the item.
Common Feed List Properties
FeedItem.DownloadUrlStringReturns the URL used for security zone mapping.
FeedItem.EnclosureIFeedEnclosureReturns the enclosure (media object) associated with the item.
FeedItem.IsReadBooleanReturns true if the item has been viewed.
FeedItem.LocalIdIntegerReturns the ID assigned by the Feed Download Engine.
FeedItem.ParentIFeedReturns the parent feed.

IFeedEnclosure

The IFeedEnclosure interface provides access to the optional media file attachment that may be associated with each feed item.

Enclosure AttributesTypeDescription
FeedEnclosure.LengthIntegerRequired. Returns the length in bytes of the enclosure.
FeedEnclosure.TypeStringRequired. Returns the MIME type.
FeedEnclosure.UrlStringRequired. Returns the source URL of the file.
Common Feed List Properties
FeedEnclosure.DownloadMimeTypeStringReturns the final MIME type.
FeedEnclosure.DownloadUrlStringReturns the URL used for security zone mapping.
FeedEnclosure.LocalPathStringReturns the local system path of the downloaded file.
FeedEnclosure.ParentIFeedItemReturns the parent feed item.

Feed Synchronization

The Internet Explorer 7 aggregator (the Feed Download Engine) automatically downloads the feed items from the source URL specified in the feed. These downloads can occur on a schedule, or as requested by the user. The value of the Interval property and Ttl element of the feed determine how often the feed is downloaded; the feed is updated when the current time is equal to LastDownloadTime plus the maximum of these two values.

The following table lists the methods and properties that control the download and synchronization behavior of feeds:

Synchronization PropertiesTypeDescription
FeedsManager.BackgroundSync(action) Possible actions are: Enable, Disable, or RunNow.
FeedsManager.BackgroundSyncStatusFEEDS_BACKGROUNDSYNC_STATUSReturns the status (Disabled, Enabled) of the Feed Download Engine.
FeedsManager.DefaultIntervalIntegerReturns, in minutes, the system-defined download interval.
FeedsManager.ItemCountLimitIntegerReturns the upper limit of items that can be kept.
Feed.DownloadEnclosuresAutomaticallyBooleanReturns true if enclosures are automatically downloaded with the feed.
Feed.IntervalIntegerReturns, in minutes, how frequently the Feed Download Engine should download this feed.
Feed.MaxItemCountIntegerReturns the number of items to keep when downloading this feed.
Feed.SyncSettingFEEDS_SYNC_SETTINGSpecifies whether to use the local or global interval setting, or disable automatic download entirely.
Feed.TtlStringReturns, in minutes, how long the feed should be cached according to the XML of the feed.
Synchronization Methods
FeedsManager.AsyncSyncAll Forces update of all feeds, regardless of LastDownloadTime or Ttl.
Feed.Download Downloads the feed and merges its contents into the system feed list.
FeedEnclosure.AsyncDownload Downloads the enclosure.
FeedEnclosure.CancelAsyncDownload Cancels a download operation in progress.
Success Indicators
Feed.LastDownloadTimeFloating-point numberReturns the date and time of the last successful download.
FeedItem.LastDownloadTimeFloating-point numberReturns the date and time of the last successful update.
Feed.LastDownloadErrorFEEDS_DOWNLOAD_ERRORReturns the download error of the feed, if any.
Feed.DownloadStatusFEEDS_DOWNLOAD_STATUSReturns the status of the feed.
FeedEnclosure.LastDownloadErrorFEEDS_DOWNLOAD_ERRORReturns the download error of the enclosure, if any.
FeedEnclosure.DownloadStatusFEEDS_DOWNLOAD_STATUSReturns the status of the enclosure.

Related Topics

Community Additions

Show:
© 2014 Microsoft