本文整理了Java中org.apache.xerces.impl.xs.XMLSchemaLoader.setErrorHandler()
方法的一些代码示例,展示了XMLSchemaLoader.setErrorHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaLoader.setErrorHandler()
方法的具体详情如下:
包路径:org.apache.xerces.impl.xs.XMLSchemaLoader
类名称:XMLSchemaLoader
方法名:setErrorHandler
[英]Sets the error handler.
[中]设置错误处理程序。
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
public void setErrorHandler(ErrorHandler errorHandler) {
fErrorHandler = errorHandler;
fErrorHandlerWrapper.setErrorHandler(errorHandler != null ? errorHandler : DraconianErrorHandler.getInstance());
fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper);
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
/**
* Get an instance of XSLoader that is capable of
* parsing schema files
*
* @return
*/
public XSLoader getXSLoader()
{
XMLSchemaLoader xsloader = new XMLSchemaLoader();
JBossXSErrorHandler eh = new JBossXSErrorHandler();
xsloader.setErrorHandler(eh);
xsloader.setProperty("http://apache.org/xml/properties/internal/grammar-pool", new XMLGrammarPoolImpl());
return xsloader;
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
/**
* Get an instance of XSLoader that is capable of
* parsing schema files
* @param xeh XML Error handler
* @param xer XML Entity Resolver
* @return
*/
public XSLoader getXSLoader(XMLErrorHandler xeh, XMLEntityResolver xer)
{
XMLSchemaLoader xsloader = new XMLSchemaLoader();
xsloader.setEntityResolver(xer);
xsloader.setErrorHandler(xeh);
xsloader.setProperty("http://apache.org/xml/properties/internal/grammar-pool", new XMLGrammarPoolImpl());
return xsloader;
}
代码示例来源:origin: org.wso2.bpel/ode-utils
schemaLoader.setErrorHandler(eh);
代码示例来源:origin: elodina/xml-avro
public Schema createSchema(LSInput input) {
ErrorHandler errorHandler = new ErrorHandler();
XMLSchemaLoader loader = new XMLSchemaLoader();
if (resolver != null)
loader.setEntityResolver(new EntityResolver(resolver));
loader.setErrorHandler(errorHandler);
loader.setParameter(Constants.DOM_ERROR_HANDLER, errorHandler);
XSModel model = loader.load(input);
errorHandler.throwExceptionIfHasError();
return createSchema(model);
}
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
BaseSchemaFactory(String xsdVersion) {
fErrorHandlerWrapper = new ErrorHandlerWrapper(DraconianErrorHandler.getInstance());
fDOMEntityResolverWrapper = new DOMEntityResolverWrapper();
fXMLGrammarPoolWrapper = new XMLGrammarPoolWrapper();
fXMLSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, true);
fXMLSchemaLoader.setProperty(XMLGRAMMAR_POOL, fXMLGrammarPoolWrapper);
fXMLSchemaLoader.setProperty(XML_SCHEMA_VERSION, xsdVersion);
fXMLSchemaLoader.setEntityResolver(fDOMEntityResolverWrapper);
fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper);
fXSDVersion = xsdVersion;
fUseGrammarPoolOnly = true;
}
代码示例来源:origin: deegree/deegree3
schemaLoader.setEntityResolver( new RedirectingEntityResolver() );
schemaLoader.setErrorHandler( new XMLErrorHandler() {
@SuppressWarnings("synthetic-access")
@Override
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
try {
fErrorHandler = new DOMErrorHandlerWrapper((DOMErrorHandler) value);
setErrorHandler(fErrorHandler);
} catch (XMLConfigurationException e) {
内容来源于网络,如有侵权,请联系作者删除!