Using Rome API to parse the RSS feeds I am getting this error :
com.sun.syndication.io.ParsingFeedException: Invalid XML
at com.sun.syndication.io.WireFeedInput.build(WireFeedInput.java:210)
The code is as below:
public static void main(String[] args) {
URL url;
XmlReader reader = null;
SyndFeed feed;
try {
url = new URL("https://www.democracynow.org/podcast.xml");
reader = new XmlReader(url);
feed = new SyndFeedInput().build(reader);
for (Iterator<SyndEntry> i =feed.getEntries().iterator(); i.hasNext();) {
SyndEntry entry = i.next();
System.out.println(entry.getPublishedDate()+" Title "+entry.getTitle());
}
}
catch (Exception e) {
e.printStackTrace();
}
}
I checked for some of the links like :
Where the problem is presumably is of charsets but I could not figure a way to get this implemented. Any help or guidance would be highly appreciative.
Thanks and Regards,
Vaibhav Goswami