- Content
- What is RSS and Usage
- How do i subscribe to RSS
- Creating the XML file
- Creating the HTML file
- Testing The Sample
RSS - Really Simple Syndication also known as Rich Site Summary. RSS feeds provide Webmasters and content providers to update their site summaries to Readers of the site.
example:
A blog sites are always updating by new articles daily.
If a reader of that blog wanted to read newly posted articles, he or she wanted to go to the site and check whether there are any new posts available.
Without going to the blog site if they can check are there any new posts available. If so, readers can check the post's title and description then by selecting particular title and log into that article directly....It'll be easier for that reader.
If a reader of that blog wanted to read newly posted articles, he or she wanted to go to the site and check whether there are any new posts available.
Without going to the blog site if they can check are there any new posts available. If so, readers can check the post's title and description then by selecting particular title and log into that article directly....It'll be easier for that reader.
For that owner of the blog site has to do update a xml file with summary of newly posted articles and give a link to that file.
Readers have to do subscribe for that link and get that newly posted article's summaries to RSS reading software. (Firefox has inbuilt RSS reader. )
Now Redaer can check are there any Newly updated articles available or not.
Readers have to do subscribe for that link and get that newly posted article's summaries to RSS reading software. (Firefox has inbuilt RSS reader. )
Now Redaer can check are there any Newly updated articles available or not.
How do i subscribe to RSS
All you have to do go to the site which is give RSS feature. Almost Every updating websites are providing this feature (News sites).
You Can see These kind of RSS logos.
All you have to do go to the site which is give RSS feature. Almost Every updating websites are providing this feature (News sites).
You Can see These kind of RSS logos.
Just click on that picture from selected site. Before that you should have installed RSS reading Software. (FeedDemon from feeddemon.com)
You can use Firefox.
You can use Firefox.
Creating the XML file
Lets move on to a simple example. RSS content stored in a XML file. lets create that file.
Assume your publishing new posts to your blog site. Readers of your site needed to know your newly posted articles. So after publishing your new posts to the blog your creating or updating your RSS file. Saying that i have published these articles and here are those article's titles, description and the link for that article
Assume your publishing new posts to your blog site. Readers of your site needed to know your newly posted articles. So after publishing your new posts to the blog your creating or updating your RSS file. Saying that i have published these articles and here are those article's titles, description and the link for that article
Type following in notepad and save it as "newposts.xml".
<rss version="2.0">
<channel>
<title>New Posts</title>
<description>July articles are now available</description>
<link>http://localhost/rss/newposts.html
<item>
<title>Article 1</title>
<description>Small Description of Article 1</description>
<link>http://localhost/rss/article1.html
</item>
<item>
<title>Article 2</title>
<description>Small Description of Article 2</description>
<link>http://localhost/rss/article2.html
</item>
<item>
<title>Article 3</title>
<description>Small Description of Article 3</description>
<link>http://localhost/rss/article3.html
</item>
</channel>
</rss>
this is a simple file. Try to understand it. it'll be very easy. Above tags <channel>,<rss>,<Title>,<Description> and <link> are vital tags. beyond that there are more tags are using to describe the RSS.
like pubdate,lastbuilddate,language,copyrght,category,docs...and more. As a beginner we can start with above and you can find many tags from the internet.
like pubdate,lastbuilddate,language,copyrght,category,docs...and more. As a beginner we can start with above and you can find many tags from the internet.
Creating the HTML file
<head>
<LINK rel="alternate" type="application/rss+xml" title="RSS Newly Posts" href="http://localhost/rss/newposts.xml">
</head>
<body>
<h1>Click <a href="http://localhost/rss/newposts.xml">here</a> to Subscribe to newly posted articles</h1>
</body>
</html>
The following line tells to the rss readers to where is the RSS file located. Rss Reader will get the content of that file and shows you in a propper way.
<LINK rel="alternate" type="application/rss+xml" title="RSS Newly Posts" href="http://localhost/rss/newposts.xml">
<LINK rel="alternate" type="application/rss+xml" title="RSS Newly Posts" href="http://localhost/rss/newposts.xml">
Testing The Sample
This example is tested on apache web server Using Firefox as a web browser and RSS reader.
first of all reader has to subscrbe to that page.
i am loggin to that welcome page using firefox.
first of all reader has to subscrbe to that page.
i am loggin to that welcome page using firefox.
Then readers have to check whether there are any new posts available daily by clicking on that bookmark.
Webmaster has to do update that xml file when there are any new posts.
Webmaster has to do update that xml file when there are any new posts.
This is MaXxA macho. This is very useful to me.
ReplyDelete