Rome RSS - Disable Validation in Rome RSS
Question
In my application ROME api tries to validate the feed against and DTD in W3C and after some time it fails since W3C blocks that IP.
Is there a way that I can disable XML feed validation in ROME?
RSS XML validation is not neccessary since we get the feed from a well reputed company
Solution
can you try this?
// create a Document from inputstream is
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(is);
// fetch the feed
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(doc);
the idea is to first parse the XML into a Document and then pass that document to the SyndFeedInput. parsing with the DocumentBuilder doesn't validate against a DTD.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow