1 / 15

Creating an RSS 2.0 Feed

Creating an RSS 2.0 Feed. Azeem Ahmad. Step 1 - Declaration. RSS 2.0 must validate as XML (Extensible Markup Language), therefore the first line in the feed has to be a declaration of this: <?xml version="1.0"> You can also add encoding to the start to improve the feed:

quant
Download Presentation

Creating an RSS 2.0 Feed

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating an RSS 2.0 Feed Azeem Ahmad

  2. Step 1 - Declaration • RSS 2.0 must validate as XML (Extensible Markup Language), therefore the first line in the feed has to be a declaration of this: • <?xml version="1.0"> • You can also add encoding to the start to improve the feed: • <?xml version="1.0" encoding="utf-8"?> • Most types of encoding will work

  3. Step 2 – RSS Channel • We now need to create an RSS and CHANNEL tag, so all the content/information can go inside these tags. • <rss version="2.0"> <channel> • Stick to lower case where relevant. • Just like HTML, mixing cases can confuse things!

  4. Step 3 – Feed Information • The technical, and tricky bit of RSS – getting this wrong can make the feed invalid and it wont work properly. • In this step, we need to include: • The title of the website we’re creating the feed for • A brief, one line description of the site • A link to the site! • It will look something like..

  5. Step 3 – Feed Information • <title>The title of my RSS 2.0 Feed</title> <link>http://www.azisalegend.com/</link><description>A website about the legend that is known as Azeem!</description><language>en-uk</language> • Also possible to add the time the site was last updated, but doing so may cause issues for maintenance of the feed, and may not make the feed work.

  6. Step 4 – Adding more info • A method that allows you to add more pages to the feed. • Each item has a title, link, and description. • If you included the time in the previous step, you will need to include a publication date, and a guid. • A guid is a Globally Unique Identifier: • That’s why RSS is so complicated nowadays. • So, here’s how that part of the feed will look:

  7. Step 4 – Adding more info • <item> <title>Title of an item</title><link>http://azisalegend.com/howididit</link><description>How Az became a legend</description> </item>

  8. Step 5 – Checking the code • ‘Escaping’ – RSS developers use this term to describe the process of closing any open tags in the code. • Example: • <link>http://www.google.com<link> • Above link wont work, because it isn’t closed. • <link>http://www.google.com</link> • Above link now works because its closed.

  9. Step 6 – Close The Tags • Once all information is inside the feed, we now need to close the opening tags – similar to designing a webpage. • </channel> </rss> • LIFO – Last In, First Out • This is the easy bit of RSS • (If there is one)

  10. Step 7 – Validating The Feed • Can’t just upload any old feed to the web, it needs validation. • http://feedvalidator.org/ • Input the link to the code, it fixes any bugs you may have missed. • Also translates it into even more difficult code, which we don’t need to understand (thankfully!) • The reason for this is that lots of websites on the internet STILL cant understand how to read and use RSS properly, despite it being called 2.0.

  11. Step 8 – We’re Done! • That’s about it really. • Before you use a validator, your feed will look something like this:

  12. Step 8 – Finished Feed • <?xml version="1.0"><rss version="2.0"> <channel><title>The title of my RSS 2.0 Feed</title> <link>http://www.azisalegend.com/</link><description>A website about the legend that is known as Azeem!</description> <language>en-uk</language><item> <title>Title of an item</title><link>http://azisalegend.com/howididit.html</link><description>How Az became a legend</description> </item> </channel> </rss>

  13. Other things to note: • There are lots of different types of encoding, each has its own way of being written into RSS. • To make RSS appear ‘nicer’ on a page, it is possible to write RSS in a CSS way. • It is good practice to include a <category> tag within the <item> tag, as many more websites are now categorising their feeds so users can only subscribe to the genres they like.

  14. Other things to note: • Content type – There are millions • This presentation was designed to show you how to make an RSS feed for a website that has static pages, such as news websites – pages that don’t have much active things on them, like flash pages, or javascript. • Complicated pages need complicated coding, the same is true of RSS.

  15. And that really is it now..! • If you haven’t fallen asleep yet, thanks for listening!

More Related