Before you start
This tutorial is intended for people who want to better understand the well-known Really Simple Syndication (RSS) format and what it can do. Specifically, it shows how to leverage some of the lesser-known features of RSS to provide better data storage.
This tutorial assumes that you understand the basic concepts of XML, but familiarity with RSS is not required. Programming examples use PHP, but the basic concepts apply for any programming language.
Many people know that RSS is the format used for most syndication purposes, such as site feeds, but in the past few years it's also become the storage format of choice for other applications, such as data distribution, contact management, and other purposes. By storing data as RSS, you make it possible to use RSS aggregators and readers to access that data.
All of this leads to the notion of using RSS to store information that previously might be stored in a relational database.
The tutorial begins with an explanation of the RSS format and some actual feed samples. It then takes a twist on the classic format, and redefines it for your alternative purpose: storing arbitrary data items and their associations. You define your database format with three tables, and proceed to query them, showing that you can both emulate traditional SQL SELECT, and also provide an associative lookup. Lastly, you learn how to handle the query results, leaving them in XML form, or transforming them to user-presentable content using XML StyleSheet Transformation Language (XSLT).
The following tools are needed to follow along with this tutorial:
- PHP: Any version of PHP will do nicely. This tutorial uses PHP's back-end textual processing rather than the traditional Document Object Model (DOM) to process the XML.
- Your favorite XML editor is required to edit XML and XSLT files. The author uses vim on UNIX®, and Notepad on Windows®.

