Android Open Source - AndroidDev Sax Feed Parser

From Project

Back to project page AndroidDev.


The source code is released under:

GNU General Public License

If you think the Android project AndroidDev listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*from  www  .j a  v a  2 s  .co m*/
import java.util.List;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

public class SaxFeedParser extends BaseFeedParser {

  protected SaxFeedParser(String feedUrl){
  public List<Message> parse() {
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
      SAXParser parser = factory.newSAXParser();
      RssHandler handler = new RssHandler();
      parser.parse(this.getInputStream(), handler);
      return handler.getMessages();
    } catch (Exception e) {
      throw new RuntimeException(e);

Java Source Code List