Jimmy, I was having this same problem and eventually figured something out that works. I think what's going on is that validation *is* happening when the schema is found, but the errors are not being propegated to the program using the parser. The way I solved this was to use the parser's setErrorHandler() method, and pass an intance of the ErrorHandler interface which relays the errors to my code: DOMParser xmlParser = new DOMParser(); xmlParser.setFeature("http://xml.org/sax/features/validation", true); xmlParser.setErrorHandler(new MyErrorHandler()); ... public class MyErrorHandler implements ErrorHandler { ... public void error(SAXParserException saxpe) { System.error.println(saxpe.getMessage()); //or whatever } ... } This seems kind of silly, IMHO, but it works for me. PeterReceived on Thursday, 3 October 2002 08:35:27 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 October 2007 06:13:31 GMT