I have a validating parser but no DTD or DTD reference inside the document. But I want to require validation! So..
1) how do I tell the parser to fail if there is no DTD
2) how do I specify a *specific* DTD/Schema the InputSource has to comply to?
Currently I use the following code...
SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setNamespaceAware(true); spf.setValidating(validating); SAXParser saxParser = spf.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); xmlReader.setContentHandler(handler); xmlReader.setErrorHandler(handler); xmlReader.setDTDHandler(handler); xmlReader.setEntityResolver(myresolver); xmlReader.parse(new InputSource(is));
cheers -- Torsten
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]