gpt4 book ai didi

org.apache.xerces.impl.xs.XMLSchemaLoader.setErrorHandler()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 16:52:40 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.xerces.impl.xs.XMLSchemaLoader.setErrorHandler()方法的一些代码示例,展示了XMLSchemaLoader.setErrorHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaLoader.setErrorHandler()方法的具体详情如下:
包路径:org.apache.xerces.impl.xs.XMLSchemaLoader
类名称:XMLSchemaLoader
方法名:setErrorHandler

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) {

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com