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);
Advertisements

0 Responses to “Turning off XML validation when Error 503 is returned”



  1. Leave a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


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

Join 78 other followers

April 2010
S M T W T F S
« Mar   May »
 123
45678910
11121314151617
18192021222324
252627282930  

Blog Stats

  • 822,357 hits

%d bloggers like this: