Web Templates
Web Templates  
Photoshop Layouts  
Flash Templates  
Templates Resource - Web Templates
   
 
  Sign UpPassword
Templates Resource Services Support Specials Members View Cart
 
  Photoshop Tutorials
  HTML Tutorials
  ASP Tutorials
  CSS Tutorials
  Javascript Tutorials
  PHP Tutorials
  XML Tutorials
  Flash Tutorials
  Fireworks Tutorials
  3D Studio Max Tutorials
  Cinema 4d Tutorials
  Graphics
  Website Tools
  Web Templates
  About Templates Resource
  Affiliates Program
  TR Support
  Webmaster Resources
 Columbia Tech Support

WebDesignHelper.co.uk

 

XML Tutorials

RSS - Really Simple Syndication

Beginner

 

RSS, or Really Simple Syndication is an XML-based format that allows links, news posts, and other lists to be displayed in an organized manner.

Introduction
You can view the Spoono Grapevine RSS at http://www.spoono.com/grapevine.xml. As you can see, it gives several key information which RSS viewers, such as Cell Phones, PDAs, and online RSS Viewers. There is a step by step process which needs to be followed to make a correct RSS file. This tutorial teaches how to code it; once you have the code, you can automate it by using a server side language like PHP or ASP which automatically publishes it. Let's get started.

More Tutorials

Declaring XML
You have to realize that RSS is a type of XML file, so the first thing you have to do is declare it as an XML file. You do this by writing:

<?xml version="1.0" ?>

Declaring RSS
The next thing you have to define is the RSS format and version. The version this tutorial will teach is the latest version which is out right now, 2.0. So to define RSS, type:

<?xml version="1.0" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">
</rss>

Declaring Channel
The next and final thing you have to delcare is the Channel. The Channel is a subordinate of RSS which contains all the date for the RSS file. Your code should now look like:

<?xml version="1.0" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
</channel>

</rss>

Declaring Miscellaneous Information
There are some optional elements which you can insert into your RSS page. They're sort of obvious when you read the tags, just replace the inside tag with your information:

<?xml version="1.0" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">
<channel>

<title>Spoono Grapevine</title>
<link>http://www.spoono.com/</link>
<description>News and updates about design and programming.</description>
<language>en-us</language>
<copyright>Copyright 1999-2003 Spoono LLC</copyright>
<lastBuildDate>Mon, 30 Sep 2002 11:00:00 GMT</lastBuildDate>
<docs>http://backend.userland.com/rss</docs>
<managingEditor>webmaster@spoono.com</managingEditor>
<webMaster>webmaster@spoono.com</webMaster>
<ttl>60</ttl>

</channel>
</rss>

The Actual List
The final step in all of this is to finally list the news post or the main content you have to display. You can do this simply. Each post is called an "item". Inside the item tags are the "title", "author", and "description" tags which you have to define. Just keep defining it for each list item you have. Also, a personal preference of mine is to put the description stuff inside CDATA so it doesn't get parsed by XML. Look at the bolded code, it shows 2 different lists.

<?xml version="1.0" ?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">
<channel>
<title>Spoono Grapevine</title>
<link>http://www.spoono.com/</link>
<description>News and updates about design and programming.</description>
<language>en-us</language>
<copyright>Copyright 1999-2003 Spoono LLC</copyright>
<lastBuildDate>Mon, 30 Sep 2002 11:00:00 GMT</lastBuildDate>
<docs>http://backend.userland.com/rss</docs>
<managingEditor>webmaster@spoono.com</managingEditor>
<webMaster>webmaster@spoono.com</webMaster>
<ttl>60</ttl>

<item>
<title>Some New v4 Info</title>
<author>Brian</author>
<description>
<![CDATA[ Welcome to Spoono v4! To get you better acqainted with the site, please read our big news post in the Spoono Tap area. Right now, v4 is still full of quite a few bugs, which we hope to iron out in the next couple weeks. Please contact us if you find anything that seems the least bit odd. If Spoono appears in a strange color one day, no need to fear (We meant to do that. You can choose from 7 different colors in the Flavors area). We still have a lot of content to get up. So, we should be adding a whole lot of tutorials in the next few weeks.
]]>

<item>
<title>Some New v4 Info</title>
<author>Brian</author>
<description>
<![CDATA[ Welcome to Spoono v4! To get you better acqainted with the site, please read our big news post in the Spoono Tap area. Right now, v4 is still full of quite a few bugs, which we hope to iron out in the next couple weeks. Please contact us if you find anything that seems the least bit odd. If Spoono appears in a strange color one day, no need to fear (We meant to do that. You can choose from 7 different colors in the Flavors area). We still have a lot of content to get up. So, we should be adding a whole lot of tutorials in the next few weeks.
]]>
</description>
</item>

</channel>
</rss>

Conclusion
That is the final step, and voila you're finished. It's not too complicated and pretty easy to write the code for. Try it out, and if you have any questions, post and we'll reply.

 

This tutorial is provided to you by Spoono

 

 

XML Tutorials

Commenting and CDATA
This article will teach you about commenting and learning how to write text which you want to go unparsed in XML.

Beginner

Intro to XML
This article will give a brief introduction to XML.

Beginner

RSS - Really Simple Syndication
RSS, or Really Simple Syndication is an XML-based format that allows links, news posts, and other lists to be displayed in an organized manner.

Intermediate

XML Rules
Learn the simple rules of XML.

Beginner

XML Stylesheets
This article will introduce you to the XSL stylesheet language and how it can be used to display XML as HTML in a browser.

Intermediate

More Tutorials
Templates Resource FAQ Services Terms of Use Site Map Support View Cart

© Copyright 2003-2008 Templates Resource