public boolean verify(Node node) throws SAXException {
SAXEventGenerator generator = new SAXEventGenerator(node);
// generate startDocument/endDocument events
generator.setDocumentEmulation(true);
generator.setErrorHandler(errorHandler);
VerifierHandler handler = getVerifierHandler();
generator.makeEvent(handler);
return handler.isValid();
}