Useful links for
developers of
RSS and XML


These links provide some basic information about RSS and XML. Once you know the basics of generating RSS from your site, you can apply the specific guidelines for the RSS needed to make the XML needed for SWPAP's calendar ... and add a useful XML component to your site as well!

Setting up an RSS feed Though the instructions are specific to ColdFusion, this is an overall excellent explanation of the process that should be useful to anyone wishing to create RSS from a data-driven web site. An experienced JSP, ASP or PHP programmer could likely easily extrapolate from this article the information needed to create an RSS feed.

RSS Workshop Well-regarded RSS primer from Utah State Library.

Generating RSS with ASP

Generating RSS with MySQL and php

Java library to generate RSS

RSS validator to test your code. Gives comments on failures.

If you know of any other links to helpful information, please email me.

SWPAP webmaster page for XML/RSS

The SWPAP calendar collects XML from SWPAP member web sites and combines it into a database that is then displayed with SWPAP member events in chronological order. In order for an organization's XML to work in the calendar, it must be validated RSS 2.0, and further conform to specific use of the fields in that RSS spec. To test how well your XML would display on the SWPAP site, you can go here (note that this a more specific test than the one found at an RSS validator; however you may want to use an RSS validator which gives helpful comments on failures if you are having any difficulty with your code).

Once you think you have created an XML feed for your organization that will work on the SWPAP calendar, or if you have questions about developing your feed, send email to the SWPAP webmaster with your XML feed URL so that he can add your organization to the SWPAP calendar.

It is the responsibility of each organization to provide XML for the calendar, according to the requirements below. Because various SWPAP member sites employ differing methods of creating pages (JSP, ColdFusion, php, asp, etc.) this page will focus on the needed end result, assuming individual webmasters will apply the techniques needed in their own environments to produce the XML. However, there are at left some links that should be helpful for webmasters in varying environments, especially if you are relatively new to XML output and/or RSS.

For many, especially those already at least somewhat familiar with RSS, the best starting point is to look at a sample of the XML used to display on the SWPAP calendar:


Note that several specific uses are made of the XML children. The children to "channel" use the name of the organization for "title"; a link to the organization's home page for "link"; a very specific phrase identifying the content for "description"; the expected entries for "language" and "copyright"; the home server's RSS directory for "docs"; the date the XML was created for "lastBuildDate"; the apporopriate entries for "image" and its XML children to point to the logo or other image for the organization under "image". To anyone familiar with creating RSS, these are all very straightforward.

As with all RSS feeds, the desired content is contained in the group of children called "item". In the implementation for the SWPAP calendar (which we believe is also a good implementation in general for any of our members to generate XML), the children of "item" are used in these specific ways: "title" is the name of the performance, chosen to be quickly recognizable to arts patrons as an event of interest; "description" is the key information about the event, about which more is discussed below; "link" is a link to the specific page at the member site for this event (which can be a general page, a specific page, a dynamic page with passed parameters as in the example above, or even the organziation's home page); "author" is the email address the organization wants associated with the calendar; and "pubDate" is the date of the event. More on this use of "pubDate" below.

What goes in the "description"?

In this implementation we are using this child element to provide the basic information about the event. First, the date, which we assume you will pass similarly to this portion of the description and to the "pubDate". Note the specific format for the date. Next, the city and state of the performance; then, the time. In some cases, there may also be a one or two-word genre identifier, like "Dance" or "Opera". In the course of building your XML, you will likely draw on several of your own database fields to make the "description" element.

Why two dates?

You will note that each "item" contains the date twice, once in as a part of "description" and once in the "pubDate". Also, you will note that "pubDate", unlike most RSS, is not the date the information was generated, but is rather the date that the event will occur. This allows the "items", once passed into the collective database, to be sorted on the "pubDate" date, but also display the date of the performance when displayed in this or any other use of the XML, so that if your XML is displayed in an aggregator (which often does not show the pubDate) readers will see the dates. Be careful that your dates conform to the format indicated.

Note that if you do wish to have your XML available for aggregators and other viewing, many aggregators will collect only the 10 newest dates, so if you typically have more than 10 upcoming events on your calendar, you may want to have two outputs: one with all of your events for the SWPAP calendar (that's the XML URL we would use for you) and another with just the next 10 events for use by aggregators and readers (this is the one that you would link from your XML icon on your home page, calendar page, etc.)