Legal Information |
|
In order to create an RSS feed. we need to understand the makeup of the "rss.xml" file. This is best done by having a template to understand the makeup. The following goes from the simple to the more complicated.
First point to remember. The template below does NOT include all possible options and/or variations. In order to discover all the technical details and possibilities about XML, try www.feedvalidator.org/docs/rss2.html. This will lead you slowly and surely into the possibilities of RSS template creation and all its permutations.
All the commands like HTML are enclosed in '<' '>' as you can see below. Some commands demand that the "command" or "code" be placed between the < opening and the ending > such as the first line in the template: Other commands demand a beginning and an end marker such as
<item> </item>
As in HTML the marker with the / (slash) such as </item> tells XML you are at the end of the entry marked as <item>
First the Template then we will begin to divide it up.
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' >
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>" "</title>
<description>" "</description>
<copyright>" "</copyright>
<link>" "</link>
<language>" "</language>
<lastBuildDate>" "</lastBuildDate>
<image>
<title>" "</title>
<width></width><height></height>
<link></link>
<url></url>
</image>
<item>
<title></title>
<link></link>
<dc:creator></dc:creator>
<pubDate></pubDate>
<description></description>
</item>
</channel>
</rss>
Lets divide this template up into THREE sections.
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' >
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
This section tells the reader/parser/file just what the file is. In effect without too much detail at the moment it announces to the world: "Hello. I am an XML file and I adhere to the RSS XML template version 2.0 as proposed at http://purl.org/dc/elements/1.1/."
Search Knowledge Base | Feedback |