org.dom4j.io
Class SAXValidator
java.lang.Object
org.dom4j.io.SAXValidator
public class SAXValidator
extends java.lang.Object
SAXValidator
validates an XML document by writing the document
to a text buffer and parsing it with a validating SAX parser. This could be
implemented much more efficiently by validating against the dom4j object
model directly but at least allows the reuse of existing SAX based validating
parsers.
protected void | configureReader() - Configures the XMLReader before use
|
protected XMLReader | createXMLReader() - Factory Method to allow alternate methods of creating and configuring
XMLReader objects
|
ErrorHandler | getErrorHandler() - DOCUMENT ME!
|
XMLReader | getXMLReader() - DOCUMENT ME!
|
void | setErrorHandler(ErrorHandler errorHandler) - Sets the
ErrorHandler used by the SAX
XMLReader .
|
void | setXMLReader(XMLReader reader) - Sets the
XMLReader used to parse SAX events
|
void | validate(Document document) - Validates the given
Document by writing it to a validating
SAX Parser.
|
SAXValidator
public SAXValidator()
SAXValidator
public SAXValidator(XMLReader xmlReader)
configureReader
protected void configureReader()
throws SAXException
Configures the XMLReader before use
createXMLReader
protected XMLReader createXMLReader()
throws SAXException
Factory Method to allow alternate methods of creating and configuring
XMLReader objects
getErrorHandler
public ErrorHandler getErrorHandler()
DOCUMENT ME!
- the
ErrorHandler
used by SAX
getXMLReader
public XMLReader getXMLReader()
throws SAXException
DOCUMENT ME!
- the
XMLReader
used to parse SAX events
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
Sets the ErrorHandler
used by the SAX
XMLReader
.
errorHandler
- is the ErrorHandler
used by SAX
setXMLReader
public void setXMLReader(XMLReader reader)
throws SAXException
Sets the XMLReader
used to parse SAX events
reader
- is the XMLReader
to parse SAX events
validate
public void validate(Document document)
throws SAXException
Validates the given Document
by writing it to a validating
SAX Parser.
document
- is the Document to validate
Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by 