xmlReader = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser" );
xmlReader.setFeature( "http://xml.org/sax/features/validation", true );
xmlReader.setFeature( "http://apache.org/xml/features/validation/schema", true );
xmlReader.setErrorHandler( errorHandler );
xmlReader.setEntityResolver( new CachedFileEntityResolver() );
}
( (MessagesErrorHandler) xmlReader.getErrorHandler() ).setHasDtdAndXsd( hasDtdAndXsd );
return xmlReader;