Creating an RSS News Feed with Text

COE Techweb
COE Home
UO Home

 

The RSS file itself, like its HTML cousin, is a simple text file. It begins with two lines to identify the version of XML and RSS that can utilize the file:

<?xml version="1.0"?>
<rss version="0.91">

This is followed by "channel" information to describe the type of news contained in the file, the related Url of the publication, the language used, contact information, etc. Example:

<channel>
<title>Roman Archaeology</title> <link>http://darkwing.uoregon.edu/~mharrsch/romanarch.html</link>
<description>Items of interest about excavations and history of the ancient Roman world</description>
<language>en-us</language>

Then each news item, enclosed by the <item></item> tag, includes a title, a URL, and a description. Example:

<item>
<title>Wooden cart and team found in Roman grave </title>
<link>http://www.ekathimerini.com/4dcgi/news/content.asp?aid=262 </link>
<description>A team working under archaeologist Diamantis Triandafyllos uncovered the four-wheeled cart, which was decorated with bronze ornaments and buried along with the two horses that drew it, in a large tumulus near the village of Mikri Doxipara, some 25 kilometers. </description>
</item>

After all news items have been included, the document closes with:

</channel>
</rss>

XML does have a few characters that are reserved for special purposes. These characters must be replaced by their XML equivalents: The five most common are:

&amp; for the ampersand &
&quot; for the double quote "
&apos; for the single quote '
&lt; for the less-than bracket <
&gt; for the greater-than bracket >

XML also does not like emdashes. I replace these with two hyphens (--).

To make sure you haven't overlooked any special characters or made a mistake in your tags, you can validate your RSS file at http://feeds.archive.org/validator/check.

COE Techweb
COE Home
UO Home

If you have an RSS feed that would be of interest
to faculty and students at the College of Education
please contact Mary Harrsch.

Last updated: 03/05/2003