public class SAXValidate extends DefaultHandler implements ErrorHandler
Constructor and Description |
---|
SAXValidate(boolean validateschema)
Create instance of handler class
|
Modifier and Type | Method and Description |
---|---|
void |
error(SAXParseException exception) |
static void |
main(String[] args)
main routine to test validation.
|
void |
runTest(Reader xml,
String parserName)
Test XML file
|
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fatalError, warning
public SAXValidate(boolean validateschema)
validateschema
- booleanpublic void error(SAXParseException exception) throws SAXException
error
in interface ErrorHandler
error
in class DefaultHandler
SAXException
public static void main(String[] args)
public void runTest(Reader xml, String parserName) throws IOException, ClassNotFoundException
xml
- ReaderparserName
- String Name of a SAX2 compliant class, for example org.apache.xerces.parsers.SAXParserIOException
ClassNotFoundException
Copyright © 2019. All rights reserved.