Posts Tagged ‘sax

03
Apr
10

Turning off XML validation when Error 503 is returned

This page describes the process of turning off validation when you get the following error.

java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

Tried to do the following but no luck.

 SAXParserFactory factory = SAXParserFactory.newInstance();
 factory.setValidating(false);

The DTD is still downloaded from the Web site indicated in the XML document.

It worked by doing the following:

spf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);



Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 75 other followers

May 2017
S M T W T F S
« Mar    
 123456
78910111213
14151617181920
21222324252627
28293031  

Blog Stats

  • 813,774 hits