7.3 Information Syndication RSS

Recently, there has been an unprecedented caution regarding data privacy. With infamous leaks  and instances of phishing and spamming all around, no one wants to put their personal information  out there without restraint, in fear of being the next unfortunate target. This makes staying posted  with favored content on the massive expanse of the World Wide Web a daunting task. There  appears to be a trade-off between user control and unobstructed access. To gain access to a  preferred blog, which regularly posts about top travel destinations or let’s say the latest technical  trends, one is often asked to offer up personal information on a plate in exchange for a rudimentary  subscription service. One alternative to staying updated with rich content is via social media, but  then again that too does not advocate privacy. 

It seems like its time to grab onto the steering wheels. 

What is RSS? 

RSS is an open method for delivering regularly changing web content. Many news-related sites,  weblogs, and other online publishers syndicate their content as an RSS Feed to whoever wants it. 

Any time you want to retrieve the latest headlines from your favorite sites, you can access the  available RSS Feeds via a desktop RSS reader. You can also make an RSS Feed for your own  site if your content changes frequently. 

In brief: 

∙ RSS is a protocol that provides an open method of syndicating and aggregating web  content. 

∙ RSS is a standard for publishing regular updates to web-based content. 

∙ RSS is a Syndication Standard based on a type of XML file that resides on an Internet  server. 

∙ RSS is an XML application, which conforms to the W3C's RDF specification and is  extensible via XML. 

∙ You can also download RSS Feeds from other sites to display the updated news items on  your site, or use a desktop or online reader to access your favorite RSS Feeds. 

What does RSS stand for? It depends on what version of RSS you are using. ∙ RSS Version 0.9 - Rich Site Summary 

RSS Version 1.0 - RDF Site Summary 

RSS Versions 2.0, 2.0.1, and 0.9x - Really Simple Syndication 

What is RSS Feed? 

∙ RSS Feed is a text XML file that resides on an Internet server. 

∙ An RSS Feed file includes the basic information about a site (title, URL, description), plus  one or more item entries that include - at a minimum - a title (headline), a URL, and a  brief description of the linked content.

∙ There are various flavors of RSS Feed depending on RSS Version. Another XML Feed  format is called ATOM. 

∙ RSS Feeds are registered with an RSS registry to make them more available to viewers  interested in your content area. 

∙ RSS Feeds can have links back to your website, which will result in a high traffic to your  site. 

∙ RSS Feeds are updated hourly (Associated Press and News Groups), some RSS Feeds are  updated daily, and others are updated weekly or irregularly. 

How Does RSS Work? 

This is how RSS works: 

∙ A website willing to publish its content using RSS creates one RSS Feed and keeps it on  a web server. RSS Feeds can be created manually or with software. 

∙ A website visitor will subscribe to read your RSS Feed. An RSS Feed will be read by an  RSS Feed reader. 

∙ The RSS Feed Reader reads the RSS Feed file and displays it. The RSS Reader displays  only new items from the RSS Feed. 

∙ The RSS Feed reader can be customized to show you content related to one or more RSS  Feeds and based on your own interest. 

News Aggregators and Feed Readers 

RSS Feed readers and news aggregators are essentially the same thing; they are a piece of  software. Both are used for viewing RSS Feeds. News aggregators are designed specifically to  view news-related Feeds but technically, they can read any Feeds. 

Who can Use RSS? (Uses Of RSS) 

RSS started out with the intent of distributing news-related headlines. The potential for RSS is  significantly larger and can be used anywhere in the world. 

Consider using RSS for the following: 

New Homes - Realtors can provide updated Feeds of new home listings on the market. 

Job Openings - Placement firms and newspapers can provide a classified Feed of job  vacancies. 

Auction Items - Auction vendors can provide Feeds containing items that have been  recently added to eBay or other auction sites. 

Press Distribution - Listing of new releases. 

Schools - Schools can relay homework assignments and quickly announce school  cancellations. 

News & Announcements - Headlines, notices, and any list of announcements.

Entertainment - Listings of the latest TV programs or movies at local theatres. 

RSS is growing in popularity. The reason is fairly simple. RSS is a free and easy way to promote  a site and its content without the need to advertise or create complicated content sharing  partnerships. 

Benefits of RSS: 

∙ RSS forms a tunneled subscription service, handled solely by the client. ∙ It exterminates the need to disclose personal information to multiple websites but delivers  controlled, automated and regular content, without any additional baggage. ∙ Can be used to increase traffic on a website. 

Example code 

Below is a sample RSS document. 

1. filter_none 

2. brightness_5 

3. <?xml version="1.0" encoding="UTF-8" ?> 

4. <rss version="2.0"> 

5.  

6. <channel> 

7. <title>RSS title</title> 

8. <link> https://mywebsitename/index.html </link>  

9. <description>My Blog</description> 

10. <item> 

11. <title>My First Feed</title> 

12. <link>http://mywebsitename/blog/article/1.html</link>  13. <description>My new article</description> 

14. </item> 

15. <item> 

16. <title>My Second Feed</title> 

17. <link>http://mywebsitename/blog/article/2.html</link>  18. <description>Another new article</description> 

19. </item> 

20. </channel> 

21.  

22. </rss>


 

Explanation of the code : 

1. First comes the XML tag, its version and encoding scheme. 

2. The following line marks the beginning of the RSS tag with its version in use. . 3. The next few lines show the channel tag, which marks the beginning of the RSS Feed. It  holds the title of the channel, a hyperlink to it and a description of the channel. . 4. Within the channel tag are defined one or more items which is essentially the content or  story, each with its own title, link and description. The channel can hold data in any form  – images, gifs, audio etc. Each has its own unique XML tag. 

Once the XML is ready and validated, it is uploaded to the server. This allows a registered  aggregator to access the RSS document.The XML has to be constantly updated with new content.  This task is performed and managed by the website developers and owners. There also exist third 

party automated RSS providers such as Bloggers and WordPress offering in-built automated RSS  services. 

On the aggregator side, the newly updated RSS document is intercepted by a ‘RSS Reader’. The  RSS reader regularly checks the registered RSS Feeds for freshly brewed content. This reader is  presented as a user interface and can be built into a website, or installed on a device to be made  available to clients. There are several widely available RSS Feed Readers such as QuiteRSS and  FeedReader. The client can easily specify the Feed URLs the reader must look into. When needed,  the client can as easily opt out from this content delivery. 

Example of XML code: 

External DTD declaration: 

To have the external DTD declaration in an XML document, we must include the reference to  the DTD file in the <!DOCTYPE> definition, as we have done in the following example. 

1. <?xml version="1.0"?> 

2. <!DOCTYPE beginnersbook SYSTEM "bb.dtd"> 

3. <beginnersbook> 

4. <to>My Readers</to> 

5. <from>Chaitanya</from> 

6. <subject>A Message to my readers</subject> 

7. <message>Welcome to beginnersbook.com</message> 

8. </beginnersbook>


 

The <!DOCTYPE> definition in the above document contains the reference to “bb.dtd” file.  Here is the content of “bb.dtd” file that contains the DTD for above XML document – 

1. <!ELEMENT beginnersbook (to,from,subject,message)> 

2. <!ELEMENT to (#PCDATA)> 

3. <!ELEMENT from (#PCDATA)> 

4. <!ELEMENT subject (#PCDATA)> 

5. <!ELEMENT message (#PCDATA)>


 

Internal DTD Declaration:

1. <?xml version = "1.0" encoding = "UTF-8" standalone = "yes" ?> 2. <!DOCTYPE address [ 

3. <!ELEMENT address (name,company,phone)> 

4. <!ELEMENT name (#PCDATA)> 

5. <!ELEMENT company (#PCDATA)> 

6. <!ELEMENT phone (#PCDATA)> 

7. ]> 

8. 

9. <address> 

10. <name>Tanmay Patil</name>


 

11. <company>TutorialsPoint</company> 

12. <phone>(011) 123-4567</phone> 

13. </address>


 

DTD for above Document is: 

1. <!ELEMENT address (name,company,phone)> 

2. <!ELEMENT name (#PCDATA)> 

3. <!ELEMENT company (#PCDATA)> 

4. <!ELEMENT phone_no (#PCDATA)>


 

XML with Internal DTD declaration: 

1. <?xml version="1.0"?>  

2. <!-- XML DTD declaration starts here --> 

3. <!DOCTYPE beginnersbook [ 

4. <!ELEMENT beginnersbook (to,from,subject,message)> 

5. <!ELEMENT to (#PCDATA)> 

6. <!ELEMENT from (#PCDATA)> 

7. <!ELEMENT subject (#PCDATA)> 

8. <!ELEMENT message (#PCDATA)> 

9. ]> 

10. <!-- XML DTD declaration ends here--> 

11. <beginnersbook> 

12. <to>My Readers</to> 

13. <from>Chaitanya</from> 

14. <subject>A Message to my readers</subject> 

15. <message>Welcome to beginnersbook.com</message> 

16. </beginnersbook>


 

Old Question: 

2074 Ashwin 

2068 Chaitra: