By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

An Introduction to RSS

This is a short Introduction to rss feeds, and shows a basic example of how rss is used.

Created: 2012-05-31 11:27

This is a simple Introduction explaining the basics of RSS, you may want to take a look on the Article explaining how to create your RSS dynamically using PHP.

A simple RSS feed

The purpose of the RSS feeds are explained in the Tutorial index. But to summarize an RSS feed consist of a collection of links, usually along with a small description. People can add this feed to their RSS reader, which will will allow them to easily check for updates. An example is shown below:

<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
 <title>Learn By Doing</title>
 <description>Learn HTML, Learn CSS, Learn PHP</description>
  <title>HTML 4.01</title>
  <description>HTML HyperText Markup Language</description>
  <title>CSS level X</title>
  <description>The Cascading Style Sheets Tutorial</description>

Elements in RSS

The first tag is the document tag, it includes the version of xml used, along with the character encoding. The next is the RSS opening tag, which defines the version of RSS used, and tells a given device its an rss feed.

The channel element

This element has three required children:

  1. title
  2. link
  3. description

Note. Each channel can have one or more items.

The item element

Each item represent an entry in the channel such as, an article or blog entry. The item element has these required children elements:

  1. title
  2. link
  3. description

Where the title usually is the title of the Article or blog entry, which the item is representing. The link contains the Absolute Path to the resource. Finally the description often contains a portion of the original resource text.

If you would like to see a working example, as well as try it in your RSS Reader or browser, you can check out Brugbarts Dynamically generated Articles RSS Feed