0
我正在嘗試閱讀使用羅馬1.7.4的RSS提要的內容。以下是我的代碼:無法獲得羅馬的RSS提要內容
public static void main(String[] args) {
try{
URL feedURL = new URL("http://feeds.feedburner.com/consumeraffairs/SXJd");
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(feedURL));
System.out.println("Feed Title: " + feed.getTitle());
for (SyndEntry entry : feed.getEntries()){
System.out.println("Entry Title: " + entry.getTitle());
System.out.println("URL: " + entry.getUri());
for (SyndContent content : entry.getContents()){
System.out.println("Content: " + content.getValue());
}
}
} catch (Exception ex) {
ex.printStackTrace(System.out);
}
}
我試圖獲取Feed的內容,但它從來沒有進入內容循環。對變量的檢查表明content = null。我究竟做錯了什麼?