com.ctc.wstx.api.ReaderConfig.setUndeclaredEntityResolver()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(121)

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

ReaderConfig.setUndeclaredEntityResolver介绍

暂无

代码示例

代码示例来源:origin: SonarSource/sonarqube

/**
 * Stax parser for a given stream handler and iso control chars set awarness to on.
 * The iso control chars in the xml file will be replaced by simple spaces, usefull for
 * potentially bogus XML files to parse, this has a small perfs overhead so use it only when necessary
 *
 * @param streamHandler              the xml stream handler
 * @param isoControlCharsAwareParser true or false
 */
public StaxParser(XmlStreamHandler streamHandler, boolean isoControlCharsAwareParser) {
 this.streamHandler = streamHandler;
 XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
 if (xmlFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver(new UndeclaredEntitiesXMLResolver());
 }
 xmlFactory.setProperty(XMLInputFactory.IS_VALIDATING, false);
 xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
 this.isoControlCharsAwareParser = isoControlCharsAwareParser;
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: org.sonarsource.flex/sonar-flex-plugin

public StaxParser(XmlStreamHandler streamHandler) {
 this.streamHandler = streamHandler;
 XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
 if (xmlFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver((publicID, systemID, baseURI, namespace) -> namespace);
 }
 xmlFactory.setProperty(XMLInputFactory.IS_VALIDATING, false);
 xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: pmayweg/sonar-groovy

public StaxParser(XmlStreamHandler streamHandler) {
 this.streamHandler = streamHandler;
 XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
 if (xmlFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver((String publicID, String systemID, String baseURI, String namespace) -> namespace);
 }
 xmlFactory.setProperty(XMLInputFactory.IS_VALIDATING, false);
 xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: org.codehaus.sonar/sonar-plugin-api

/**
 * Stax parser for a given stream handler and iso control chars set awarness to on.
 * The iso control chars in the xml file will be replaced by simple spaces, usefull for
 * potentially bogus XML files to parse, this has a small perfs overhead so use it only when necessary
 *
 * @param streamHandler              the xml stream handler
 * @param isoControlCharsAwareParser true or false
 */
public StaxParser(XmlStreamHandler streamHandler, boolean isoControlCharsAwareParser) {
 this.streamHandler = streamHandler;
 XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
 if (xmlFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver(new UndeclaredEntitiesXMLResolver());
 }
 xmlFactory.setProperty(XMLInputFactory.IS_VALIDATING, false);
 xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
 this.isoControlCharsAwareParser = isoControlCharsAwareParser;
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-scanner-engine

/**
 * Stax parser for a given stream handler and iso control chars set awarness to on.
 * The iso control chars in the xml file will be replaced by simple spaces, usefull for
 * potentially bogus XML files to parse, this has a small perfs overhead so use it only when necessary
 *
 * @param streamHandler              the xml stream handler
 * @param isoControlCharsAwareParser true or false
 */
public StaxParser(XmlStreamHandler streamHandler, boolean isoControlCharsAwareParser) {
 this.streamHandler = streamHandler;
 XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
 if (xmlFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver(new UndeclaredEntitiesXMLResolver());
 }
 xmlFactory.setProperty(XMLInputFactory.IS_VALIDATING, false);
 xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
 this.isoControlCharsAwareParser = isoControlCharsAwareParser;
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: SonarSource/sonar-java

public StaxParser(UnitTestIndex index) {
 this.streamHandler = new SurefireStaxHandler(index);
 XMLInputFactory xmlInputFactory = SafetyFactory.createXMLInputFactory();
 if (xmlInputFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlInputFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver((String publicID, String systemID, String baseURI, String namespace) -> namespace);
 }
 this.inf = new SMInputFactory(xmlInputFactory);
}

代码示例来源:origin: org.sonarsource.java/java-surefire

public StaxParser(UnitTestIndex index) {
 this.streamHandler = new SurefireStaxHandler(index);
 XMLInputFactory xmlInputFactory = SafetyFactory.createXMLInputFactory();
 if (xmlInputFactory instanceof WstxInputFactory) {
  WstxInputFactory wstxInputfactory = (WstxInputFactory) xmlInputFactory;
  wstxInputfactory.configureForLowMemUsage();
  wstxInputfactory.getConfig().setUndeclaredEntityResolver((String publicID, String systemID, String baseURI, String namespace) -> namespace);
 }
 this.inf = new SMInputFactory(xmlInputFactory);
}

代码示例来源:origin: SonarSource/sonar-python

public StaxParser(XmlStreamHandler streamHandler) {
 this.streamHandler = streamHandler;
 WstxInputFactory xmlFactory = (WstxInputFactory) SafetyFactory.createXMLInputFactory();
 xmlFactory.configureForLowMemUsage();
 xmlFactory.getConfig().setUndeclaredEntityResolver(new UndeclaredEntitiesXMLResolver());
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: org.sonarsource.python/sonar-python-plugin

public StaxParser(XmlStreamHandler streamHandler) {
 this.streamHandler = streamHandler;
 WstxInputFactory xmlFactory = (WstxInputFactory) SafetyFactory.createXMLInputFactory();
 xmlFactory.configureForLowMemUsage();
 xmlFactory.getConfig().setUndeclaredEntityResolver(new UndeclaredEntitiesXMLResolver());
 inf = new SMInputFactory(xmlFactory);
}

代码示例来源:origin: Nextdoor/bender

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: FasterXML/woodstox

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: woodstox/wstx-asl

setUndeclaredEntityResolver((XMLResolver) value);
break;

代码示例来源:origin: woodstox/wstx-lgpl

setUndeclaredEntityResolver((XMLResolver) value);
break;

相关文章

微信公众号

最新文章

更多

ReaderConfig类方法