开发者

Using feed:// in rome

开发者 https://www.devze.com 2023-02-16 07:49 出处:网络
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\");

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消