Introduction to RSS - RSS Syntax
(Page 2 of 5 )
RSS defines an XML grammar (a set of HTML-like tags) for sharing news. Each RSS text file contains both static information about your site, plus dynamic information about your new stories, all surrounded by matching start and end tags.
Each story is defined by an <item> tag, which contains a headline TITLE, URL, and DESCRIPTION. Here's an example:
...
<item>
<title>RSS Resources</title>
<link> http://www.webreference.com/authoring/languages/xml/rss/ </link>
<description>Defined in XML, the Rich Site Summary (RSS) format has
quietly become a dominant format for distributing headlines on the Web.
Our list of links gives you the tools, tips and tutorials you need to get
started using RSS. 0323</description>
</item>
...
Each RSS channel can contain up to 15 items and can be easily parsed using Perl or other server-side software like ASP, PHP, etc.
RSS files are metadata.
An RSS file commonly contains four main types of elements: channel, image, items, and text input. These elements are easy to identify and code, as the example in Listing 1 demonstrates. An example of an item within an RSS 0.91 file, Listing 1 contains three easily identifiable parts: a title, a link, and a description.
<item>
<title>Mozilla Dispenses with Old, Proprietary DOM</title>
<link>http://www.mozillazine.org/talkback.html?article=604</link>
<description>The Mozilla team has decided to forgo backwards
compatibility with Netscape's proprietary DOM.</description>
Next: Creating RSS Files >>
More Web Services Articles
More By Unknown User