tags:

views:

21

answers:

1

hello guys

I Just started looking at this technology , but i am finding it hard to understand,

i want to just reed in a simple rss feed url,

and display its contents how could i do this?

this is what i lloked at so far

URL inpFile = new URL("feed://images.apple.com/main/rss/hotnews/hotnews.rss");
ChannelIF channel = FeedParser.parse(new ChannelBuilder(), inpFile);

System.out.println(channel.getDescription());

this creates a malformed url exeception, can anyone help me???

A: 

I've used Informa, but your problem has nothing to do with Informa. Your URL is malformed. java.net.URL expects a standard URL, i.e., one with a "normal" scheme like "http:". Thus, it barfs on a URL with the scheme "feed:". Try using:

URL inpFile = new URL("http://images.apple.com/main/rss/hotnews/hotnews.rss")
ChannelIF channel = FeedParser.parse(new ChannelBuilder(), inpFile);

Also, if you run into problems with Informa, try the ROME API. I quit using Informa, in favor of ROME, awhile ago.

Brian Clapper