In this recipe, we will learn how to consume RSS feeds. RSS (Really Simple Syndication) feeds are published by many news agencies and informational websites such as CNN. RSS/ATOM is also used extensively in publishing blogs. RSS is based on XML format.
Let's try to check what is published at a CNN feed first. There are many feeds available at CNN. We will use one feed that returns the Top Stories. Check the following URL: http://rss.cnn.com/rss/cnn_topstories.rss. You should get content similar to that shown in the following screenshot, which contains the name of the top story with a link, posted date, and short description:
The following is the partial XML feed:
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?> ...