定期更新罗马的 RSS feed
我该如何去获取有关罗马的故事呢?
即我有如何获取更新版本的提要。
我目前正在打电话:
URL url = new URL("http://feeds.bbci.co.uk/news/rss.xml");
XmlReader reader = null;
SyndFeedInput input = new SyndFeedInput();
try{
reader = new XmlReader(url);
SyndFeed feed = input.build(reader);
parseFeed(feed);
}
finally {
if (reader != null)
reader.close();
}
How would I go about fetching stories with rome.
i.e. I have the feed how to get an updated version of the feed.
I am currently calling:
URL url = new URL("http://feeds.bbci.co.uk/news/rss.xml");
XmlReader reader = null;
SyndFeedInput input = new SyndFeedInput();
try{
reader = new XmlReader(url);
SyndFeed feed = input.build(reader);
parseFeed(feed);
}
finally {
if (reader != null)
reader.close();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
RSS 源将为您提供有关罗马的最新故事 [这就是 RSS 源的本质]。如果您想定期更新,您可能应该定期运行代码
The RSS feed will give you the latest stories about Rome already [such is the nature of RSS feeds]. If you want to update that periodically, you should probably run your code periodically
我认为这就是您正在寻找的内容:
http://blogs.oracle.com 的任何后续获取任何使用 feedInfoCache 的 FeedFetcher 的 /roller/rss/pat 现在只会检索已更改的提要。
要更新您的提要,请调用:
feed = feedFetcher.retrieveFeed(new URL("http://blogs.oracle.com/roller/rss/pat"));
I think this is what your are looking for:
Any subsequent fetches of http://blogs.oracle.com/roller/rss/pat by any FeedFetcher using feedInfoCache will now only retrieve the feed if it has changed.
To update your feeds call:
feed = feedFetcher.retrieveFeed(new URL("http://blogs.oracle.com/roller/rss/pat"));