0

Right now I can read the current RSS feed (10 items) using rome library in java. I want to read the previous articles from the RSS feed. Thank you for any suggestions. Here is my sample code for reading the RSS feed.

try {
    URL url = new URL(blogURL);
    XmlReader reader = new XmlReader(url);
    SyndFeed feed = new SyndFeedInput().build(reader);
    List<Article> list = new ArrayList<Article>();

    for (Iterator<?> i = feed.getEntries().iterator(); i.hasNext();) {
        SyndEntry entry = (SyndEntry) i.next();
        Article article = BeansHelper.getInstance().createArticleBean(entry);
        article.setWebsiteURl(link);
        list.add(article);
    }   
} catch(MalformedURLException ex){
    ex.printStackTrace();
}
nateyolles
  • 1,851
  • 5
  • 17
  • 23
Harinath
  • 105
  • 1
  • 4
  • 12

1 Answers1

0

See Get all RSS feed entries with Rome Library

feed.getEntries() returns all articles that are available.

Community
  • 1
  • 1
janih
  • 2,214
  • 2
  • 18
  • 24