Académique Documents
Professionnel Documents
Culture Documents
What is a Feed?
Syndication feeds – Atom/RSS/RDF feed
Feed – Small text files - information about
content on websites
Contents - articles, news, blogs and forums
When content updated – the feed text file is
also updated
Programmatically or Manually
History
1999 - My Netscape portal - single place for
news
Dan Libby (Netscape) - RDF Site Summary
(RSS) - pull information from different news
sources
an XML data format based
later known as RSS 0.9
Contd…
Dave Winer (Userland Software) -
ScriptingNews (XML based)
Combined with Libby – launched RSS (Rich
Site Summary) – RSS 0.91
Netscape continued till 2001
Winer – declared owner of RSS (RSS 2.0
called as Really Simple Syndication
RSS 2.0 – News/Blog feeds & Podcasting
What is RSS?
Designed to show selected data
RSS feed - not human readable
Piece of software - RSS aggregator
Display news - registered with, or
“subscribed to”
Unread news - appear in bold, just as
unread emails do
Atom Feed
a lightweight XML format - easy syndication
of web content
to avoid the limitations and flaws of RSS
Difference – from Developer’s view – XML
tags used
Atom is more robust than RSS
Latter still remains a widely used standard
Xerox – Photocopy (Eg.)
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Bing: Apple</title>
<link>http://www.bing.com:80/search?q=Apple</link>
<description>Search results</description>
<item>
<title>Apple (India)</title>
<link>http://www.apple.com/in/</link>
<description>Visit website for details…</description>
</item>
<item>
<title>Investor Relations - Apple</title>
<link>http://investor.apple.com/</link>
<description>Apple Inc. business for stockholders,
potential investors, and financial analysts.</description>
</item>
</channel>
</rss>
Useful Websites
RSS feeds on the fly
http://b2evolution.net/
Feed Validator
http://www.feedvalidator.org/
Google Feed API
https://developers.google.com/feed/v1/devguide
NDTV RSS Feeds
https://www.ndtv.com/rss
Demonstration
<body onload="init()">
<div>
<label>Search String: <input type="text"
id="query"/></label> <br/><br/>
<input type="button" value="Search"
onclick="fetchResults()"/> <br/><br/>
</div> <div id="results"> </div>
function init() {
xhr = new XMLHttpRequest();
query = document.getElementById("query");
searchResults =
document.getElementById("results");
}
function fetchResults()
{
var queries = query.value.split(" ").join("+");
xhr.open("GET", "search.php?query=" + queries,
true);
xhr.onreadystatechange = processResults;
xhr.send();
}
<?php
header("Content-type:text/xml");
extract($_GET);