Using feed:// in rome
So I am using rome and accessing a feed with the following url
URL url = new URL("feed://rss.cnn.com/rss/cnn_topstories.rss");
reader = new XmlReader(url);
(unrelated code edited out)
however, I get the following exception:
Exception in thread "main" java.net.MalformedURLException: unknown protocol: feed
at java.net.URL.<init>(URL.java:574)
at java.net.U开发者_JS百科RL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at Browser.getFeed(Browser.java:84)
at Browser.doBrowser(Browser.java:49)
at Browser.main(Browser.java:38)
How do I parse this feed?
Replace "feed://" with "http://" and you'll be fine.
精彩评论