本文整理了Java中org.ccil.cowan.tagsoup.Parser.setFeature()
方法的一些代码示例,展示了Parser.setFeature()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.setFeature()
方法的具体详情如下:
包路径:org.ccil.cowan.tagsoup.Parser
类名称:Parser
方法名:setFeature
暂无
代码示例来源:origin: org.ccil.cowan.tagsoup/tagsoup
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
parser.setFeature(name, value);
}
代码示例来源:origin: apache/tika
org.ccil.cowan.tagsoup.Parser.schemaProperty, schema);
parser.setFeature(
org.ccil.cowan.tagsoup.Parser.ignoreBogonsFeature, true);
代码示例来源:origin: com.github.livesense/org.liveSense.service.xssRemove
/**
* Creates a DeXSSParser with the following feature set:
* <ul>
* <li>{@link DeXSSFilterPipeline#BODY_ONLY} <code>true</code></li>
* </ul>
* And uses as parent a {@link org.ccil.cowan.tagsoup.Parser} with the following feature set:
* <ul>
* <li>{@link org.ccil.cowan.tagsoup.Parser#ignoreBogonsFeature} <code>true</code></li>
* <li>{@link org.ccil.cowan.tagsoup.Parser#defaultAttributesFeature} <code>false</code></li>
* </ul>
* TODO: Should be made more configurable.
*/
public DeXSSParser() throws SAXNotRecognizedException, SAXNotSupportedException {
super();
setFeature(DeXSSFilterPipeline.BODY_ONLY, true);
Parser parser = new Parser();
parser.setFeature(Parser.ignoreBogonsFeature, true);
parser.setFeature(Parser.defaultAttributesFeature, false);
setParent(parser);
}
}
代码示例来源:origin: net.sf.ofx4j/ofx4j
public void parseV1FromFirstElement(Reader reader) throws IOException, OFXParseException {
Parser parser = new Parser();
try {
parser.setFeature(Parser.restartElementsFeature, false);
}
catch (Exception e) {
throw new OFXParseException(e);
}
parser.setContentHandler(new TagSoupHandler(getContentHandler()));
try {
parser.parse(new InputSource(reader));
}
catch (SAXException e) {
if (e.getCause() instanceof OFXParseException) {
throw (OFXParseException) e.getCause();
}
throw new OFXParseException("Error parsing OFX document.", e);
}
}
代码示例来源:origin: stoicflame/ofx4j
public void parseV1FromFirstElement(Reader reader) throws IOException, OFXParseException {
Parser parser = new Parser();
try {
parser.setFeature(Parser.restartElementsFeature, false);
}
catch (Exception e) {
throw new OFXParseException(e);
}
parser.setContentHandler(new TagSoupHandler(getContentHandler()));
try {
parser.parse(new InputSource(reader));
}
catch (SAXException e) {
if (e.getCause() instanceof OFXParseException) {
throw (OFXParseException) e.getCause();
}
throw new OFXParseException("Error parsing OFX document.", e);
}
}
代码示例来源:origin: com.github.livesense/org.liveSense.service.xssRemove
parser.setFeature(Parser.defaultAttributesFeature, false);
parser.setFeature(Parser.useAttributes2Feature, true);
代码示例来源:origin: org.apache.tika/tika-parsers
org.ccil.cowan.tagsoup.Parser.schemaProperty, schema);
parser.setFeature(
org.ccil.cowan.tagsoup.Parser.ignoreBogonsFeature, true);
内容来源于网络,如有侵权,请联系作者删除!