|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
ml.options.SchemaValidator
public class SchemaValidator
Validator for XML documents using XML schema. This is based on JDK 5.0 and requires no outside library.
Constructor Summary | |
---|---|
SchemaValidator()
|
Method Summary | |
---|---|
void |
error(org.xml.sax.SAXParseException ex)
A method required by the org.xml.sax.ErrorHandler interface |
void |
fatalError(org.xml.sax.SAXParseException ex)
A method required by the org.xml.sax.ErrorHandler interface |
java.lang.String |
getError()
Retrieve the error message set by the org.xml.sax.ErrorHandler methods. |
boolean |
validate(java.io.Reader xmlReader)
The actual validation method. |
void |
warning(org.xml.sax.SAXParseException ex)
A method required by the org.xml.sax.ErrorHandler interface |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endElement, endPrefixMapping, 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 |
Constructor Detail |
---|
public SchemaValidator()
Method Detail |
---|
public boolean validate(java.io.Reader xmlReader) throws java.io.IOException, org.xml.sax.SAXException
getError()
method.
xmlReader
- The reader for the XML file to validate
true
if the XML file could be validated against the XML schema, else false
java.io.IOException
org.xml.sax.SAXException
public java.lang.String getError()
org.xml.sax.ErrorHandler
methods.
If no error has been found, null
is returned.
public void warning(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
org.xml.sax.ErrorHandler
interface
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
ex
- A parsing exception
org.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
org.xml.sax.ErrorHandler
interface
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
ex
- A parsing exception
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
org.xml.sax.ErrorHandler
interface
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
ex
- A parsing exception
org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |