Android Open Source - wxalert Sax Feed Parser






From Project

Back to project page wxalert.

License

The source code is released under:

Apache License

If you think the Android project wxalert 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

package com.creatuity.wxalert;
//w  ww.  ja  v a 2s . c  om
import java.util.List;

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

public class SaxFeedParser extends BaseFeedParser {

  protected SaxFeedParser(String feedUrl){
    super(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

com.creatuity.wxalert.Alert.java
com.creatuity.wxalert.AndroidSaxFeedParser.java
com.creatuity.wxalert.BaseFeedParser.java
com.creatuity.wxalert.DomFeedParser.java
com.creatuity.wxalert.FeedParserFactory.java
com.creatuity.wxalert.FeedParser.java
com.creatuity.wxalert.MessageList.java
com.creatuity.wxalert.Message.java
com.creatuity.wxalert.ParserType.java
com.creatuity.wxalert.RssHandler.java
com.creatuity.wxalert.SaxFeedParser.java
com.creatuity.wxalert.WeatherAlert.java
com.creatuity.wxalert.XmlPullFeedParser.java