Summary
Websites generally do not create RSS feeds automatically. There are various
ways to create RSS feeds. One way is to code the RSS Feed manually.
- Create the RSS feed file.
- Code the control statements for the RSS feed.
- Code the channel statements for the RSS feed.
- Code the item statements for the RSS feed.
Detail
Create the RSS Feed file.
RSS feeds can be coded manually. An RSS file is a text file and can be
created and updated using most text editors including Notepad, FrontPage or
Dreamweaver.
The basic process mimics that of any other type of Internet file:
- Code the RSS feed file
- Move it to an Internet server using any FTP product.
This lesson will create an example RSS Feed file.
- It is a barebones RSS feed file, but it provides the basics.
- The example RSS feed does not contain the optional statements.
- Colors and indentation are used to helped visualize the RSS feed. They
are, or course, not required in the actual file.
Files follow the standard Internet naming conventions, with the suffix
.xml
Code the control statements for the RSS feed.
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- </rss>
These statements define the file as an XML / RSS file.
- This is an XML version 1.0 file.
- This is an RSS version 2.0 file. RSS is one of many types of XML files.
Code the channel statements for the RSS feed.
Add the <channel></channel> tags
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- </rss>
The channel statements define the overall feed or channel. There is one
set of channel statements in the RSS file.
Add the channel / feed definition statements
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- <channel>
- <title>Website Feed</title>
- <description>Website Feed coded manually</description>
- <link>http://www.yourdomain.com</link>
- </channel>
- </rss>
This is now a valid RSS feed.
- It can be loaded to an Internet server.
- It can be validated.
- It can be subscribed to by RSS Readers.
- Note: It will not deliver any information to the RSS Reader yet, that is
the next step.
There are optional channel statements like author, copyright, and date.
Code the item statements for the RSS feed.
Add Item Information.
- An item is like an entry or a post.
- A channel will contain multiple items.
- An item for a website is usually a headline or summary of what is on the
website.
- The item points back to the website or a webpage for the full story,
article, or information.
- Each "What's New for the website is a new item.
Add Item Example One: Announcing new products.
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- <channel>
- <title>Website Feed</title>
- <description>Website Feed coded manually</description>
- <link>http://www.yourdomain.com</link>
- <item>
- <title>Announcing new Products</title>
- <description>Announcing a new line of
products</description>
- <link>http://www.yourdomain.com/products.htm</link>
- </item>
- </channel>
- </rss>
Add Item Example Two: A Special Event.
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- <channel>
- <title>Website Feed</title>
- <description>Website Feed coded manually</description>
- <link>http://www.yourdomain.com</link>
- <item>
- <title>A Special Event</title>
- <description>A Special Teleconference
for our customers about our products</description>
- <link>http://www.yourdomain.com/events.htm</link>
- </item>
- <item>
- <title>Announcing new Products</title>
- <description>Announcing a new line of
products</description>
- <link>http://www.yourdomain.com/products.htm</link>
- </item>
- </channel>
- </rss>
Add Item Example Three: Sale this week only.
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- <channel>
- <title>Website Feed</title>
- <description>Website Feed coded manually</description>
- <link>http://www.yourdomain.com</link>
- <item>
- <title>Sale this week only</title>
- <description>All household products
are 50% off this week only</description>
- <link>http://www.yourdomain.com/sales.htm</link>
- </item>
- <item>
- <title>A Special Event</title>
- <description>A Special Teleconference
for our customers about our products</description>
- <link>http://www.yourdomain.com/events.htm</link>
- </item>
- <item>
- <title>Announcing new Products</title>
- <description>Announcing a new line of
products</description>
- <link>http://www.yourdomain.com/products.htm</link>
- </item>
- </channel>
- </rss>
Notes.
To maintain an RSS Feed file,
- Continue to add new items to the RSS Feed file.
- Move the file to the Internet server using FTP
It is the job of the RSS aggregators,
- To check the RSS Feed file on a regular basis
- Deliver any new items to the subscriber
Wizard Creek Consulting
225 Camelback Road #252
| Pleasant Hill, CA 94523
les.bain@wizard-creek.com
| (925) 209-9483
Copyright © 2003 - 2010
Wizard Creek Consulting - All Rights Reserved