Really Simple Syndication is simple. Really.
1. It’s an XML document (so open it with a standard XML tag)
<?xml version="1.0" ?>
2. The root node should be an “rss” element with (at minimum) an attribute for the version:
3. Children are described with “title”, “description” and “link” elements. None have required attributes.
4. Direct children of the rss element should be “channel” elements. It can be described with the elements from #3.
5. Direct children of the channel element should either descriptors (see #3), or “item” elements (which can also be described per #3)
A Really Simple Example:
<?xml version="1.0" ?> <rss version="2.0"> <channel> <title>Title of the Channel</title> <description>Description of the Channel</description> <link>http://link.to/the/channel</link> <item> <title>First Item Title</title> <description>First Item Description</description> <link>http://link.to/this/item</description> </item> <!-- include as many item elements as you want here some people recommend 15, some say 30, others 50 or more - it's arbitrary --> </channel> </rss>
As you can see, it’s really easy to list all the recent articles, or upcoming events, or posts, whatever, with PHP outputting content just like you would markup. If you are serving it with PHP, remember to set the content header:
And to notify the browser (and enable the little RSS button), just include it as a link element:
<link rel="alternate" type="application/rss+xml" title="Title of your Feed" href="http://path.to/the/file.xml" />
That’s about it – HTH.