public void validate ( final Node document ) throws SchemaValidationException { try { final Validator validator = schema . newValidator ( ) ; validator . validate ( new DOMSource ( document ) ) ; } catch ( SAXException | IOException e ) { throw new SchemaValidationException ( e . getMessage ( ) , e ) ; } }
Validate some XML against this schema