tags:

views:

135

answers:

1

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

+1  A: 

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.

Stefan De Boey
Thanks sdb for the reply. However the error was caused by some validation initiated by the remote server and ROME had nothing to do with it.