budsiya
budsiya

Reputation: 570

Rome RSS - Disable Validation in Rome RSS

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

Upvotes: 0

Views: 866

Answers (1)

Stefan De Boey
Stefan De Boey

Reputation: 2394

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.

Upvotes: 2

Related Questions