In the second installment of RSS how-to, we look at some of the nonrequired (optional) channel and item tags, discuss RSS specifications in-depth and look at feed syndication and aggregators.
Last week we discussed RSS, the acronym used to describe the de facto standard for syndicating Web content, and we provided step-by-step instructions to help you create your own basic RSS feed using the required elements (“tags”). This week we’ll discuss some of the non-required (optional) channel and item tags, discuss RSS specifications a little more in-depth, and also look at feed syndication and aggregators.
Optional Channel Elements
In creating our first RSS feed, we used only the basic required tags needed to create a working RSS document (also called an RSS feed). These elements, as defined by the RSS 2.0 specification, are called channel elements and the required elements include
When creating an RSS document you can also use other optional sub-elements like , , , , , , and others, as defined in the RSS 2.0 Specification.
The language the channel is written in (view the RSS Language Codes here).
Copyright notice for content in channel
e-mail contact for editorial content
e-mail contact for technical issues.
The publication date for the content in the channel.
The last time the content of the channel changed.
Specify one or more categories that the channel belongs to.
Indicate the program used to generate the channel.
A URL that points to the documentation for the format used in the RSS file
Allows processes to register with a cloud to be notified of updates to the channel
“Time To Live”. Specify a number of minutes that indicates how long a channel can be cached before refreshing.
A GIF, JPEG or PNG image that can be displayed with the channel.
PICS rating for the channel.
A text input box that can be displayed with the channel.
Tells aggregators telling them which hours they can skip.
Tells aggregators telling them which days they can skip.
Optional channel elements are added in the beginning of your feed, after the open tag and before your first tag. Using our example RSS code, this is how the code might look with several optional channel elements included. The basic required code we’ve done previously is in blue, with the new optional tags in blue/bold.
Just like you can add extra tags and the corresponding information within your tag, you can also add specific, but again optional, information between the tags. Last week we discussed the main item elements (title, link, and description), but using the RSS 2.0 specification, for example offers additional elements that you can include between the open and close tags. Examples of optional tags include author, category, comments, and others, as defined in the RSS 2.0 Specification. Remember these optional tags will need to be included as open and closed tags.
E-mail contact for item author
Put the item in one or more categories
URL of a page for comments related to the item
Describes a media object attached to the item.
A string that uniquely identifies the item.
When the item was published.
The RSS channel that the item came from
Copying only the first from the code example above, here is the same required elements along with examples of some of the optional item elements included:
Know the Specifications
The best way to learn how to extend your RSS document past the basics is to actually start with the basic code (as shown in Part I: How to Create an RSS Feed), and read the RSS specifications to learn the optional tags and how to use them when creating your RSS document. You can learn more about current RSS Specifications from the RSS Specifications Web site, or at the RSS Advisory Board Web site.
The most current specification (which happens to be 2.0.10 as of the time of publishing) can always be found at this URL (RSS Advisory Board Web site).
RSS 2.0 Specification: Version 2.0.10 of the RSS 2.0 specification, published by the RSS Advisory Board on Oct. 15, 2007.
RSS 2.0 Specification: This is the original RSS 2.0 specification published by UserLand Software on August 19, 2002.
RSS 0.92 Specification: This is the RSS 0.92 specification published by UserLand Software on December 25, 2000.
RSS 0.91 Specification: This is the RSS 0.91 specification published by UserLand Software on June 9, 2000.
RSS 0.91 Specification: This is the RSS 0.91 specification published by Netscape on July 10, 1999.
RSS 0.90 Specification: This is the RSS 0.90 specification published by Netscape on March 15, 1999.
If you have followed the tutorial through to this stage, you should now have your own newly created RSS feed (saved in xml format) with some optional elements. As we did last time, again you will want to use a Feed Validator to ensure the new elements you have added work. To do this, you just need to upload the document to a Web server, then enter the URL into the Feed Validator, like FEED Validator or RSS Validator.
For those who want to produce an RSS feed, but have had difficultly creating one using this tutorial (or those who simply prefer not to play around with code), you can use a feed editor to create and manage your RSS documents. Much like any mark-up editor, feed dditors generally provide a GUI (some include a wizard-based GUI), allowing you to create the RSS document without touching, or even knowing any code. Here are a few Feed editor options, and a Google search will produce many more.
RSS Wizard (HTML to RSS converter)
“How to Make Your Own RSS Feeds” on SmallBusinessComputing.com looks at ExtraLabs Software.s Feed Editor and NotePage.s FeedforAll.
“How to Create RSS feeds with Dreamweaver” on WebReference.com looks at using RSS Dreamfeeder, an application that allows you to reformat your content into an RSS feed within Dreamweaver.
What Do I Do With my RSS Feed?
Getting back to the basics, we need to remember that the point of creating RSS feeds is so that you have a way to tell others about the new content and headlines on your own Web site, or blog, without users having to load your Web site. With a feed, users can simply choose which headlines (or items) they are interested in and go directly to that content within your Web site. Others can also display your RSS feed on their site and your feed can also be fed to users on cellular phones, any of your co-brand or network sites, affiliate sites, and even distributed through various online news portals on RSS aggregation sites. You can also provide the RSS feed directly on your own site so you visitors can subscribe to the feed and see new headlines via an RSS reader. This distribution of your RSS feed is called feed syndication.
There are many online sites where you can submit your RSS feed URL, just like there are a large number of Web search engines and directories where you can submit your Web site URL. Here are a few general submission sites to get you started:
Technorati Ping Us
Avangate also offers a list of feed submission directories, as does the RSS-Specifications Web site. There are also some industry-specific RSS feed submission sites including those for health, technology, government, education, and other industry-specific feeds which you can find through a Google search.
- Part I: How to Create an RSS Feed (Page 1)
- Part II: How to Create an RSS Feed: Optional RSS Elements , Syndication and More (Page 2)
Based in Nova Scotia, Vangie Beal is has been writing about technology for more than a decade. She is a frequent contributor to EcommerceGuide and managing editor at Webopedia. You can tweet her online @AuroraGG.
This article was originally published on July 23, 2008