• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
 
An Introduction To C# and The .NET Framework
Hands-on Lab Manual (Day 1)
 
 1
Exercise 1: Introduction to RSS
This exercise will introduce you to Really Simple Syndication [RSS] and show you how to usethe .NET framework to download and process an RSS feed from the Internet.You should already be familiar with:
eXtensible Mark-up Language (XML)At the end of this exercise you will be able to:
Describe what an RSS Feed is.
Download an RSS Feed from the Internet using the web classes in .NET
Extract data from an RSS Feed using the XML classes in .NETIf you are already familiar and confident with RSS Version 2.0 then feel free to skip straightahead to the tasks.
RSS Overview
RSS is an acronym which stands for Really Simple Syndication (other definitions exist, butthis is the most popular). Really Simple Syndication ‘feeds’ as they are known can be foundon most popular websites, such as:
 http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/technology/rss.xml 
 http://msdn.microsoft.com/rss.xml 
RSS Structure
RSS Feeds are arranged into channels and items. A channel can be thought of as a sectionin a traditional newspaper, for example, newspapers typically contain comedy, sports, politics,and other sections – an RSS feed may contain a single channel which corresponds to asection. An item in a channel is just like an article in a newspaper section.The fragment on the
next page
, which was taken from the BBC web site, illustrates thestructure of an RSS document (please note that a fair amount of detail has been removed toget a bare minimum document, it is recommended that you go and visit a real feed when youare comfortable with the concepts in this section).Notice that the RSS feed is a simple three-level XML document, broken down into,
one RSS feed 
(the ‘rss’ element),
one channel 
with associated descriptive elements, and finally,
one or more items
per channel.
 
 2
Fragment of an RSS 2.0 Document from the BBC Technology Page
<rss version="2.0"> <channel><title>BBC News | Technology | UK Edition</title> <link>http://news.bbc.co.uk/go/rss/-/1/hi/technology/default.stm</link> <description>Updated every minute of every day</description> <language>en-gb</language> <copyright>Copyright: (C) British Broadcasting Corporation, seehttp://news.bbc.co.uk/1/hi/help/rss/4498287.stm forterms and conditions of reuse</copyright>  <item><title>Web telephony gets a boost</title> <description>Vonage is hoping that selling its kits in the shops will help sell the idea of web telephonyto customers.</description><link>http://news.bbc.co.uk/go/rss/-/1/hi/technology/4565719.stm</link> </item><item><title>Long wait for Nintendo Revolution</title> <description>Nintendo says gamers may not get a chance to try its new Revolution console until nextyear's E3 games expo.</description><link>http://news.bbc.co.uk/go/rss/-/1/hi/technology/4565265.stm</link> </item></channel></rss>
 
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...