|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.ucsb.nceas.morpho.util.SAXValidate
Validate an XML document using a SAX parser
Field Summary | |
static java.lang.String |
DEFAULT_PARSER
|
Constructor Summary | |
SAXValidate(boolean validateschema)
Construct an instance of the handler class |
Method Summary | |
void |
error(org.xml.sax.SAXParseException exception)
Method for handling errors during a parse |
void |
runTest(java.io.Reader xml)
Run the validation test using the DEFAULT_PARSER defined in this class. |
void |
runTest(java.io.Reader xml,
java.lang.String parserName)
|
void |
runTest(java.io.Reader xml,
java.lang.String parserName,
java.lang.String schemaLocation)
Run the validation test. |
void |
warning(org.xml.sax.SAXParseException exception)
Method for handling warnings during a parse |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ErrorHandler |
fatalError |
Field Detail |
public static final java.lang.String DEFAULT_PARSER
Constructor Detail |
public SAXValidate(boolean validateschema)
validateschema
- Description of ParameterMethod Detail |
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
exception
- The parsing error
org.xml.sax.SAXException
- Description of Exceptionpublic void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
exception
- The parsing error
org.xml.sax.SAXException
- Description of Exceptionpublic void runTest(java.io.Reader xml) throws java.io.IOException, java.lang.ClassNotFoundException, org.xml.sax.SAXException, org.xml.sax.SAXParseException
xml
- the xml document to parse
java.io.IOException
- thrown when test files can't be opened
java.lang.ClassNotFoundException
- thrown when the SAX Parser
class can't be located
org.xml.sax.SAXException
SAXParserException
org.xml.sax.SAXParseException
public void runTest(java.io.Reader xml, java.lang.String parserName) throws java.io.IOException, java.lang.ClassNotFoundException, org.xml.sax.SAXException, org.xml.sax.SAXParseException
java.io.IOException
java.lang.ClassNotFoundException
org.xml.sax.SAXException
org.xml.sax.SAXParseException
public void runTest(java.io.Reader xml, java.lang.String parserName, java.lang.String schemaLocation) throws java.io.IOException, java.lang.ClassNotFoundException, org.xml.sax.SAXException, org.xml.sax.SAXParseException
xml
- the xml stream to be validatedparserName
- the name of a SAX2 compliant parser class
java.io.IOException
- thrown when test files can't be opened
java.lang.ClassNotFoundException
- thrown when the SAX Parser
class can't be located
org.xml.sax.SAXException
SAXParserException
org.xml.sax.SAXParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |