List of usage examples for javax.xml.validation ValidatorHandler setResourceResolver
public abstract void setResourceResolver(LSResourceResolver resourceResolver);
From source file:jeeves.utils.Xml.java
/** * Called by all validation methods to do the real guts of the validation job. * @param schema/* w w w .ja va 2s . c o m*/ * @param xml * @param eh * @throws Exception */ private static void validateRealGuts(Schema schema, Element xml, ErrorHandler eh) throws Exception { Resolver resolver = ResolverWrapper.getInstance(); ValidatorHandler vh = schema.newValidatorHandler(); vh.setResourceResolver(resolver.getXmlResolver()); vh.setErrorHandler(eh); SAXOutputter so = new SAXOutputter(vh); eh.setSo(so); so.output(xml); }