org.ccil.cowan.tagsoup.Parser.parse()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(118)

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

Parser.parse介绍

暂无

代码示例

代码示例来源:origin: apache/tika

parser.setProperty(org.ccil.cowan.tagsoup.Parser.schemaProperty, schema);
parser.setContentHandler(handler);
parser.parse(new InputSource(new StringReader(codeAsHtml)));

代码示例来源:origin: apache/tika

new HtmlHandler(mapper, handler, metadata, context, extractScripts)));
parser.parse(reader.asInputSource());

代码示例来源:origin: org.ccil.cowan.tagsoup/tagsoup

public void parse (String systemid) throws IOException, SAXException {
  parse(new InputSource(systemid));
  }

代码示例来源:origin: fourlastor/dante

@Override public void parse(String string) {
  org.ccil.cowan.tagsoup.Parser parser = new org.ccil.cowan.tagsoup.Parser();
  parser.setContentHandler(this);
  try {
    parser.parse(new InputSource(new StringReader(string)));
  } catch (IOException | SAXException e) {
    throw new HtmlParsingException(e);
  }
  emptyBuffer();
}

代码示例来源:origin: gamesbyangelina/spritely

+ query);
p.setContentHandler(handler);
p.parse(new InputSource(u.openStream()));
  p.parse(new InputSource(new URL(s).openStream()));

代码示例来源:origin: gamesbyangelina/spritely

HttpResponse response = client.execute(getRequest);
p.parse(new InputSource(response.getEntity().getContent()));

代码示例来源:origin: org.apache.tika/tika-parsers

parser.setProperty(org.ccil.cowan.tagsoup.Parser.schemaProperty, schema);
parser.setContentHandler(handler);
parser.parse(new InputSource(new StringReader(codeAsHtml)));

代码示例来源: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: 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: org.apache.tika/tika-parsers

new HtmlHandler(mapper, handler, metadata, context, extractScripts)));
parser.parse(reader.asInputSource());

相关文章