I'm new to Java and Spring boot and I am trying to read and Parse RSS feed from a site.
What's the issue: I need to read all the data from the feed and it'll be the paginated call.
What's my solution: I think, I can achieve it if I read the data in a loop unless I reach the end and there's no more data. My code is as:
SyndFeedInput input = new SyndFeedInput();
int pageNumber = 1;
do {
URL feedSource = new URL("
https://altaonline.com/feed?paged=" + pageNumber);
SyndFeed feed = input.build(new XmlReader(feedSource));
pageNumber = pageNumber + 1;
}
while ( pageNumber <= 27); //Need to fix this.
I need help with: If there's no data on this URL, it gives me exception. I am not sure, how to check if the URL is valid, or if there's any data to process. How to do it
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)