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 74 other followers

March 2017
S M T W T F S
« Mar    
 1234
567891011
12131415161718
19202122232425
262728293031  

Blog Stats

  • 800,977 hits