org.xml.sax.helpers.XMLFilterImpl.setFeature()方法的使用及代码示例

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

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

XMLFilterImpl.setFeature介绍

[英]Set the value of a feature.

This will always fail if the parent is null.
[中]设置特征的值。
如果父项为空,则此操作将始终失败。

代码示例

代码示例来源:origin: com.github.livesense/org.liveSense.service.xssRemove

/**
 * Processes feature {@link #BODY_ONLY} directly; other features are referred to the superclass.
 * @param name feature name
 * @param state feature state
 * @throws SAXNotRecognizedException, SAXNotSupportedException
 */
public void setFeature(String name, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException {
 if (name.equals(BODY_ONLY))
  bodyOnly = state;
 else
  super.setFeature(name, state);
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

@Override
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
  if(name.equals(PREFIX_FEATURE)) {
    this.namespacePrefixes = value;
    return;
  }
  if(name.equals(NAMESPACE_FEATURE) && value)
    return;
  super.setFeature(name, value);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
  if(name.equals(PREFIX_FEATURE)) {
    this.namespacePrefixes = value;
    return;
  }
  if(name.equals(NAMESPACE_FEATURE) && value)
    return;
  super.setFeature(name, value);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

@Override
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
  if(name.equals(PREFIX_FEATURE)) {
    this.namespacePrefixes = value;
    return;
  }
  if(name.equals(NAMESPACE_FEATURE) && value)
    return;
  super.setFeature(name, value);
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
  if(name.equals(PREFIX_FEATURE)) {
    this.namespacePrefixes = value;
    return;
  }
  if(name.equals(NAMESPACE_FEATURE) && value)
    return;
  super.setFeature(name, value);
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
  if(name.equals(PREFIX_FEATURE)) {
    this.namespacePrefixes = value;
    return;
  }
  if(name.equals(NAMESPACE_FEATURE) && value)
    return;
  super.setFeature(name, value);
}

代码示例来源:origin: in.jlibs/jlibs-xml

@Override
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException{
  if(SAXFeatures.NAMESPACE_PREFIXES.equals(name) && value)
    throw new SAXNotSupportedException("Feature '"+SAXFeatures.NAMESPACE_PREFIXES+"' is not supported");
  if(SAXFeatures.NAMESPACES.equals(name) && !value)
    throw new SAXNotSupportedException("Feature '"+SAXFeatures.NAMESPACES+"' is required");
  super.setFeature(name, value);
}

代码示例来源:origin: org.apache.xml/com.springsource.org.apache.xml.resolver

reader.setFeature("http://xml.org/sax/features/namespaces", nsAware);
 reader.setFeature("http://xml.org/sax/features/validation", validating);
 if (useSchema) {
reader.setFeature("http://apache.org/xml/features/validation/schema", true);

代码示例来源:origin: xml-resolver/xml-resolver

reader.setFeature("http://xml.org/sax/features/namespaces", nsAware);
 reader.setFeature("http://xml.org/sax/features/validation", validating);
 if (useSchema) {
reader.setFeature("http://apache.org/xml/features/validation/schema", true);

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

reader.setFeature("http://xml.org/sax/features/namespaces", nsAware);
 reader.setFeature("http://xml.org/sax/features/validation", validating);
 if (useSchema) {
reader.setFeature("http://apache.org/xml/features/validation/schema", true);

相关文章

微信公众号

最新文章

更多