org.apache.xerces.parsers.XMLGrammarPreparser.setEntityResolver()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(137)

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

XMLGrammarPreparser.setEntityResolver介绍

[英]Sets the entity resolver.
[中]设置实体解析程序。

代码示例

代码示例来源:origin: org.opengis.cite/cite1-utils

  1. public static Grammar parseGrammar(String baseUri, Reader in,
  2. XMLGrammarPool grammarPool, XMLErrorHandler errorHandler)
  3. throws IOException {
  4. String encoding = null;
  5. XMLGrammarPreparser grammerParser = getGrammarParser();
  6. if (grammarPool != null) {
  7. grammerParser.setGrammarPool(grammarPool);
  8. }
  9. if (errorHandler != null) {
  10. grammerParser.setErrorHandler(errorHandler);
  11. }
  12. grammerParser.setEntityResolver(getXmlEntityResolver(encoding));
  13. return grammerParser.preparseGrammar(
  14. "http://www.w3.org/2001/XMLSchema", new XMLInputSource(baseUri,
  15. baseUri, baseUri, in, encoding));
  16. }

代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator

  1. if (entityResolver != null)
  2. grammarPreparser.setEntityResolver(entityResolver);

代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi

  1. if (entityResolver != null)
  2. grammarPreparser.setEntityResolver(entityResolver);

代码示例来源:origin: deegree/deegree3

  1. preparser.setEntityResolver( resolver );
  2. preparser.setFeature( NAMESPACES_FEATURE_ID, true );
  3. preparser.setFeature( VALIDATION_FEATURE_ID, true );

代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator

  1. if (entityResolver != null)
  2. grammarPreparser.setEntityResolver(entityResolver);

代码示例来源:origin: com.thaiopensource/jing

  1. EntityResolver er = properties.get(ValidateProperty.ENTITY_RESOLVER);
  2. if (er != null)
  3. preparser.setEntityResolver(new EntityResolverWrapper(er));
  4. try {
  5. preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, toXMLInputSource(source.getInputSource()));

代码示例来源:origin: org.daisy.libs/jing

  1. EntityResolver er = properties.get(ValidateProperty.ENTITY_RESOLVER);
  2. if (er != null)
  3. preparser.setEntityResolver(new EntityResolverWrapper(er));
  4. try {
  5. preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, toXMLInputSource(source.getInputSource()));

相关文章