public class XmlValidator
extends java.lang.Object
implements org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Constructor and Description |
---|
XmlValidator()
Constructs an XML Validator.
|
Modifier and Type | Method and Description |
---|---|
void |
error(org.xml.sax.SAXParseException e)
Receives notification of a recoverable parser error.
|
void |
fatalError(org.xml.sax.SAXParseException e)
Receives notification of a non-recoverable parser error.
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Resolves access to external entities.
|
java.lang.String |
validate(java.io.InputStream xmlStream)
Validates the encoded XML in the input stream.
|
void |
warning(org.xml.sax.SAXParseException e)
Receives notification of a parser warning.
|
public java.lang.String validate(java.io.InputStream xmlStream)
xmlStream
- Encoded XML.public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
resolveEntity
in interface org.xml.sax.EntityResolver
publicId
- Public identifier of the external entity being
referenced, or null if none was supplied.systemId
- System identifier of the external entity being
referenced.public void warning(org.xml.sax.SAXParseException e)
warning
in interface org.xml.sax.ErrorHandler
e
- Exception resulting from the warning.public void error(org.xml.sax.SAXParseException e)
error
in interface org.xml.sax.ErrorHandler
e
- Exception resulting from the recoverable error.public void fatalError(org.xml.sax.SAXParseException e)
fatalError
in interface org.xml.sax.ErrorHandler
e
- Exception resulting from the non-recoverable error.