Accessing RSS feeds from a website

I'd like to write a small program that can connect to a website, and access the latest RSS feeds from a website, such as http://www.bbc.co.uk or http://www.cnn.com

I've dealt with connecting to websites and parsing the HTML to access other http links before, but I have little idea about accessing RSS feeds.

My understanding is that I'll need to access an XML file, which give me links to the feeds available, from there I'll need to open up one of the links, read in the HTML and then rip out the story text.

Does this sound right? Can anyone give me any pointers, link me to any useful websites or give me any idea how to start?

Thankyou

[675 byte] By [Unconditionala] at [2007-11-26 13:46:23]
# 1
For getting something from an HTTP URL: http://java.sun.com/docs/books/tutorial/networking/For processing RSS formats, perhaps:https://rome.dev.java.net/
DrClapa at 2007-7-8 1:21:25 > top of Java-index,Java Essentials,Java Programming...
# 2
I'm not really interested in taking someone elses code, was more intereted about the general gist of how accessing RSS feeds would work.
Unconditionala at 2007-7-8 1:21:25 > top of Java-index,Java Essentials,Java Programming...
# 3
Oh, okay. Then your original description was accurate enough. You'll have to read up on the various RSS specifications before you will be able to implement code that handles them.
DrClapa at 2007-7-8 1:21:25 > top of Java-index,Java Essentials,Java Programming...
# 4

Some sites, such as CNN...

http://rss.cnn.com/rss/cnn_topstories.rss

use an RSS, whilst other use an XML file..

http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml

What are the differences between the two?

Are there certain 'rules' which govern how the two types of files should be formatted/written so that all news readers are compatible with all news feeds?

Unconditionala at 2007-7-8 1:21:25 > top of Java-index,Java Essentials,Java Programming...
# 5

There is nothing different about them.

An RSS document is an XML document that only uses a specific set of tags (defined here http://blogs.law.harvard.edu/tech/rss ).

There is no specification defining the file name extension associated with RSS.

matfud

If you look at the source produced from both of those URL's they oth start with an XML preamble followed by

<rss>

<channel>

......

</channel>

</rss>

matfuda at 2007-7-8 1:21:25 > top of Java-index,Java Essentials,Java Programming...