com.sun.syndication.io.WireFeedInput.createSAXBuilder()方法的使用及代码示例

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

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

WireFeedInput.createSAXBuilder介绍

[英]Creates and sets up a org.jdom2.input.SAXBuilder for parsing.
[中]创建并建立一个组织。jdom2。输入用于解析的SAXBuilder。

代码示例

代码示例来源:origin: org.apache.marmotta/sesame-tools-rio-rss

/**
 * Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom2.Document)'.
 * <p>
 * @param is W3C SAX InputSource to read to create the WireFeed.
 * @return the WireFeed read from the W3C SAX InputSource.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(InputSource is) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    Document document = saxBuilder.build(is);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

代码示例来源:origin: rome/rome

/**
 * Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
 * <p>
 * @param is W3C SAX InputSource to read to create the WireFeed.
 * @return the WireFeed read from the W3C SAX InputSource.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(InputSource is) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    Document document = saxBuilder.build(is);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

代码示例来源:origin: com.sun.syndication/com.springsource.com.sun.syndication

/**
 * Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
 * <p>
 * @param is W3C SAX InputSource to read to create the WireFeed.
 * @return the WireFeed read from the W3C SAX InputSource.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(InputSource is) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    Document document = saxBuilder.build(is);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

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

/**
 * Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom2.Document)'.
 * <p>
 * @param is W3C SAX InputSource to read to create the WireFeed.
 * @return the WireFeed read from the W3C SAX InputSource.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(InputSource is) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    Document document = saxBuilder.build(is);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

代码示例来源:origin: rome/rome

/**
 * Builds an WireFeed (RSS or Atom) from an Reader.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
 * <p>
 * @param reader Reader to read to create the WireFeed.
 * @return the WireFeed read from the Reader.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(Reader reader) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    if (_xmlHealerOn) {
      reader = new XmlFixerReader(reader);
    }            
    Document document = saxBuilder.build(reader);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

代码示例来源:origin: com.sun.syndication/com.springsource.com.sun.syndication

/**
 * Builds an WireFeed (RSS or Atom) from an Reader.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
 * <p>
 * @param reader Reader to read to create the WireFeed.
 * @return the WireFeed read from the Reader.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(Reader reader) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    if (_xmlHealerOn) {
      reader = new XmlFixerReader(reader);
    }            
    Document document = saxBuilder.build(reader);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

代码示例来源:origin: org.apache.marmotta/sesame-tools-rio-rss

/**
 * Builds an WireFeed (RSS or Atom) from an Reader.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom2.Document)'.
 * <p>
 * @param reader Reader to read to create the WireFeed.
 * @return the WireFeed read from the Reader.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(Reader reader) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    if (_xmlHealerOn) {
      reader = new XmlFixerReader(reader);
    }            
    Document document = saxBuilder.build(reader);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

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

/**
 * Builds an WireFeed (RSS or Atom) from an Reader.
 * <p>
 * NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom2.Document)'.
 * <p>
 * @param reader Reader to read to create the WireFeed.
 * @return the WireFeed read from the Reader.
 * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
 * @throws FeedException if the feed could not be parsed
 *
 */
public WireFeed build(Reader reader) throws IllegalArgumentException,FeedException {
  SAXBuilder saxBuilder = createSAXBuilder();
  try {
    if (_xmlHealerOn) {
      reader = new XmlFixerReader(reader);
    }            
    Document document = saxBuilder.build(reader);
    return build(document);
  }
  catch (JDOMParseException ex) {
    throw new ParsingFeedException("Invalid XML: " + ex.getMessage(), ex);
  }
  catch (IllegalArgumentException ex) {
    throw ex;
  }
  catch (Exception ex) {
    throw new ParsingFeedException("Invalid XML",ex);
  }
}

相关文章