Report this Article

Understanding RSS – Part Eleven – A Full RSS Template File to Create Your Very Own RSS Feed

  • Posted September 17, 2006
  • by
  • in category RSS

  • Comments 0
  • Views 0

This is a “medium level” RSS template. Here we add some more Channel information plus the CDATA command along with the rest of item commands. This template is without the “enclosure” command. My previous article had the basic bare-bones template and my next one will have a template you can use for Podcasting or Videocasting.

You can easily copy and paste this into a template.
If you are not a techie and dealing with XML for the first time, use a decent text only editor, unless you can use FrontPage or DreamWeaver or a dedicated XML editor. Be careful of any extra charcters that you may sneak in with your typing, and remember not to touch the opening or closing brackets. If you do not know what you are doing do NOT touch the first three lines. The line beginning with the “channel” element is where you should begin to substitute the information on your feed.

Below we have two items in this channel. You can of course add as many items as your heart desires. Just keep on adding the entire section of beginning and ending with

<item></item> and filling in the information.

First a template with information and then a template without. (The editing software forces an empty line between each command however in your Feed you should not have any empty lines. Just delete the lines with no information if you copy & paste)

<?xml version="1.0" encoding="utf-8"?><br /> <?xml-stylesheet type='text/css' ?><br /> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>

<description>RSS Feed for The Great<br /> Perfume Products Sold At Randy&#8217;s Pandy&#8217;s Perfumery</description>

<copyright>Copyright 2006 Randy<br /> Pandy&#8217;s Perfumery &#8211; All Rights Reserved</copyright>

<link>http://www.randypandy.com</link>

<language>en-us</language>

<managingEditor>randypandy@randypandy.com<br /> (Randy Pandy)</managingEditor>

<webMaster>webmaster@randypandy.com (Pandy Randy)</webMaster>

<pubdate>Mon, 5 Dec 2005 23:00:00 GMT</pubdate>

<pubdate>Mon, 5 Dec 2005 23:00:00 GMT</pubdate>

<lastBuildDate>Sun, 4 Dec 2005 23:00:00 GMT</lastBuildDate>

<image>

<width>142</width><height>99</height>

<link>http://www.randpandy.com</link>

<url>http://www.randpandy.com/images/randylogo.jpg</url>

</image>

<Item>

<link>http://www.randypandy.com/perfumes/heavenscent.html</link>

<description>[CDATA[<img border="0"<br /> src="http://www.randypandy.com/perfumes/heaven.JPG" width="138"<br /> height="180"/> <p> Heaven Scent Perfume the Smell your lover<br /> will die for. Created especially by Skunk Perfumes it is their<br /> newest and best selling perfume on the market today. Purchase a<br /> beautifully shaped skunk bottle with this incredible perfume and<br /> get a whopping 50% off! And if you purchase over $100 we will<br /> throw in Free overnight delivery as well!<br /> randypandy.com - All Perfumes You Can Ever Desire<br /> <br clear=all>]]</description>

<pubDate>Sat, 10 Dec 2005 23:00:00 GMT</pubDate>

<author>sandy@randypandy.com<br /> Sandy Pandy &#8211; The Queen of Scent)</author>

<comments><br /> http://www.randypandy.com/perfumes/comments/skunkyheavenscent.html<br /> </comments>

<guid<br /> isPermaLink="true"><br /> http://www.randypandy.com/perfumes/heavenscent.html<br /> </guid>

<source<br /> url="http://www.yaddayadda/hs.xml">Secret Source of Heaven Scent<br /> Publicity</source>

</Item>

</Channel>

</rss>

Now Just the Bare Bones Template.

<?xml version="1.0" encoding="utf-8"?><br /> <?xml-stylesheet type='text/css' ?><br /> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>

<width></width><height></height>

<link></link>

<url></url>

</image>

<Item>

<link></link>

<description>[CDATA[<br clear=all>]]</description>

<pubDate></pubDate>

<author></author>

<category></category>

<comments></comments>

<guid></guid>

<source></source>

</Item>

</Channel>

</rss>

This will work and without too much trouble if you want to create a full RSS feed (with no enclosures for music or video) this is what you need.

This Article was Part Eleven of the RSS Mania – Understanding RSS series. All parts of this series are available at Ezine Articles (www.ezinearticles.com)

  1. RSS Mania Addiction – An Introduction to RSS and the Terminology
  2. Outline of How to Create an RSS Feed
  3. The Template File
  4. The Basic Elements of the Channel Element
  5. How The RSS Feed Works & Some Programming Constructs
  6. RSS Channel Sub-Elements Specifically Image & How To Use It
  7. Understanding RSS – The Elements Within the “Item” Element
  8. Understanding RSS – Podcasting, VideoCasting & The Magic of the Enclosure Sub-Element
  9. Understanding RSS – Rounding Out The Multi-Media – The CDATA Command
  10. Understanding RSS – Part Ten – A Basic Template File to Create Your Very Own RSS Feed

Copyright © 2005 Ted W. Gross. All rights reserved. (You may publish this article in its entirety with the following author’s information with live links only.)

Ted Gross - EzineArticles Expert Author

Ted W. Gross owns Virgin Earth http://www.virginisrael.com, a real estate brokerage firm in Jerusalem, Israel. Virgin Earth represents residential and commercial real estate all over Israel. Virgin Earth also maintains an RSS Feed on its current properties and also operates Virgin Earth – Israel Tourism & Information Portal on the same site. Ted Gross is also a published author and maintains a web site for his works. This can be found at: http://www.virginisrael.com/twg/iw.html Virgin Earth Blog can be found at: http://virginearth.blogspot.com/

Share

admin Article's Source: http://articles.org/193146_understanding_rss__part_eleven__a_full_rss_template_file_to_create_your_very_own_rss_feed/
Author:


  • Posted On September 17, 2006
  • Published articles 283513

Post Comment