public class XmlValidator
extends java.lang.Object
| Constructor and Description |
|---|
XmlValidator()
Constructs a new validator using the standard error stream for
error reporting.
|
XmlValidator(java.io.PrintWriter prntr)
Constructs a new validator using the given print writer for
error reporting.
|
| Modifier and Type | Method and Description |
|---|---|
void |
printSAXParseException(org.xml.sax.SAXParseException e)
Reports the given SAX parsing exception.
|
void |
printSAXParseException(org.xml.sax.SAXParseException e,
java.lang.String kind)
Reports the given SAX parsing exception and its kind.
|
void |
validate(java.io.File f)
Attempts to validate the XML document in the given file.
|
void |
validate(java.io.File f,
CleanerEntityResolver er)
Attempts to validate the XML document in the given file,
using the given entity resolver if it is non-null.
|
void |
validate(org.xml.sax.InputSource ins)
Attempts to validate the XML document on the given input source.
|
void |
validate(org.xml.sax.InputSource ins,
CleanerEntityResolver er)
Attempts to validate the XML document on the given input source,
using the given entity resolver if it is non-null.
|
void |
validate(java.lang.String uri)
Attempts to validate the XML document with the given URI.
|
void |
validate(java.lang.String uri,
CleanerEntityResolver er)
Attempts to validate the XML document with the given URI,
using the given entity resolver if it is non-null.
|
public XmlValidator()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic XmlValidator(java.io.PrintWriter prntr)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic void validate(org.xml.sax.InputSource ins,
CleanerEntityResolver er)
throws java.io.IOException,
org.xml.sax.SAXException,
InvalidXMLException
java.io.IOExceptionorg.xml.sax.SAXExceptionInvalidXMLExceptionpublic void validate(org.xml.sax.InputSource ins)
throws java.io.IOException,
org.xml.sax.SAXException,
InvalidXMLException
java.io.IOExceptionorg.xml.sax.SAXExceptionInvalidXMLExceptionpublic void validate(java.io.File f,
CleanerEntityResolver er)
throws java.io.IOException,
org.xml.sax.SAXException,
InvalidXMLException
java.io.IOExceptionorg.xml.sax.SAXExceptionInvalidXMLExceptionpublic void validate(java.io.File f)
throws java.io.IOException,
org.xml.sax.SAXException,
InvalidXMLException
java.io.IOExceptionorg.xml.sax.SAXExceptionInvalidXMLExceptionpublic void validate(java.lang.String uri,
CleanerEntityResolver er)
throws java.io.IOException,
org.xml.sax.SAXException,
InvalidXMLException
java.io.IOExceptionorg.xml.sax.SAXExceptionInvalidXMLExceptionpublic void validate(java.lang.String uri)
throws java.io.IOException,
org.xml.sax.SAXException,
InvalidXMLException
java.io.IOExceptionorg.xml.sax.SAXExceptionInvalidXMLExceptionpublic void printSAXParseException(org.xml.sax.SAXParseException e)
public void printSAXParseException(org.xml.sax.SAXParseException e,
java.lang.String kind)