javax.xml.validation

Class Validator


public abstract class Validator
extends java.lang.Object

A processor that validates a document against a schema.

Since:
1.3

Constructor Summary

Validator()

Method Summary

ErrorHandler
getErrorHandler()
boolean
getFeature(String name)
Object
getProperty(String name)
LSResourceResolver
getResourceResolver()
void
reset()
Reset this validator to its original state.
void
setErrorHandler(ErrorHandler errorHandler)
void
setFeature(String name, boolean value)
void
setProperty(String name, Object value)
void
setResourceResolver(LSResourceResolver resourceResolver)
void
validate(Source source)
Validate the specified input.
void
validate(Source source, Result result)
Validate the specified input.

Constructor Details

Validator

protected Validator()

Method Details

getErrorHandler

public ErrorHandler getErrorHandler()


getFeature

public boolean getFeature(String name)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


getProperty

public Object getProperty(String name)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


getResourceResolver

public LSResourceResolver getResourceResolver()


reset

public void reset()
Reset this validator to its original state.


setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)


setFeature

public void setFeature(String name,
                       boolean value)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


setProperty

public void setProperty(String name,
                        Object value)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


setResourceResolver

public void setResourceResolver(LSResourceResolver resourceResolver)


validate

public void validate(Source source)
            throws SAXException,
                   IOException
Validate the specified input.

Parameters:
source - the document to validate


validate

public void validate(Source source,
                     Result result)
            throws SAXException,
                   IOException
Validate the specified input.

Parameters:
source - the document to validate
result - the PSVI document to output