Posts Tagged ‘xml validation

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

July 2017
S M T W T F S
« Mar    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Blog Stats

  • 822,606 hits