GeekIMO

GeekIMO *
Please login or register.

Login with username, password and session length
 

  • Home
  • Help
  • Search
  • Login
  • Register

  • GeekIMO »
  • Guides »
  • Web Development Guides & Tips »
  • how-To-Guide - Write RSS & Atom Feeds
« previous next »
  • Reply
  • Print
Pages: 1   Go Down

Author Topic: how-To-Guide - Write RSS & Atom Feeds  (Read 297 times)

Offline i-CONICA

  • Administrator
  • Guest
  • Posts: 8
  • Geek-Ups: +0/-0
    • View Profile
    • FileQuake.com
how-To-Guide - Write RSS & Atom Feeds
« on: September 01, 2008, 07:36:22 AM »
  • Quote
Here is a basic tutorial on how to write RSS feeds for your websites.

I'm going to use images to show what different code does.

Start by making an empty file called rss.xml in your favourite text editor.

Just like with html, You need to declare your doctype, Paste this code to the top of your .xml file.
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
That is your doctype declaration sorted.

Now you need to add a channel, A channel is basically a feed.
You need to paste
Code: [Select]
<channel>
right below your doctype.

Paste
Code: [Select]
</channel></rss> at the bottom of your page.
You should have this so far.


Now, Your RSS file needs a title. This is what the feed will be called in feedburner, Or what ever RSS reader your users prefer. The title would usually be the websites title. Your pages titles will be wrote a little later on.
Add
Code: [Select]
<title>geekimo.comLatest Software Updates!</title>right after your channel code.
Now you need a link to that title, The title will be a hyperlink to your site also. So put your home page's link there, Your link goes directly below your feed title.
Code: [Select]
<link>http://geekimo.com</link>Now a description, motto, or catchphrase of your site, a short snappy sentence to summarise your whole site.
Code: [Select]
<description>All the latest Software all available to download, quickly &amp; Safely.</description>

Ok, Now we're ready to add some stuff.

Each page you want to list in your RSS feed is called an item. They are made up of several elements. A title, a published date, a link and a description.

Makes sense ay?

These elements look like this
Code: [Select]
<item>
               <title>AVG Anti-Virus Free Edition 8.0.169</title>
               <link>http://i-conica.net/download/antivirus/avg-av/avg-av.htm</link>
               <pubDate>Fri, 29 Aug 2008</pubDate>
               <description>AVG Free is the most popular free solution available at no cost
               to home users and provides the high level of detection capability
               that millions of users around the world trust to protect their
               computers. Known globally as the best free anti-virus protection and
               even better than all or most paid product. AVG has been the choice
               of all computer techs/geeks for years.</description>
     </item>
Each page you wish to syndicate, needs to have all those elements each. So paste that code over and over and change the necessary parts.

You now should have this.


So for each item you'd repeat the last code snippet. The full RSS.xml file with 3 syndicated pages in it would look like this.


That code will produce this page, When viewed in an RSS reader. Different readers will display your feed slightly differently. This is the default Feedburner view, Using the above code.



If your unsure of anything i've wrote here, Or have a question about it. Post your question below.

Good Luck!
« Last Edit: October 07, 2008, 12:40:10 AM by 1 »
Report to moderator   Logged

99

  • Guest
Re: how-To-Guide - Write RSS & Atom Feeds
« Reply #1 on: October 09, 2008, 07:22:19 PM »
  • Quote
Thanks, found this searchin, exactly what i wanted, searchin how do i write rss on google does't really show how to write the actual code just shows readers and such.

thanks for the simpel guide.  :K)
Report to moderator   Logged

Offline Cloud

  • Administrator
  • Guest
  • Posts: 870
  • Geek-Ups: +14/-0
    • View Profile
    • Forge Team
Re: how-To-Guide - Write RSS & Atom Feeds
« Reply #2 on: October 09, 2008, 07:23:07 PM »
  • Quote
;) looks like your diggin works i-CONICA. Lol^^^
Report to moderator   Logged

  • Reply
  • Print
Pages: 1   Go Up
« previous next »
  • GeekIMO »
  • Guides »
  • Web Development Guides & Tips »
  • how-To-Guide - Write RSS & Atom Feeds
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:

  • Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
  • Sitemap
  • RSS
  • WAP2

Page created in 0.623 seconds with 16 queries.