Android Open Source - havadurumu Geo Planet Data Handler






From Project

Back to project page havadurumu.

License

The source code is released under:

Apache License

If you think the Android project havadurumu 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.tr.kodgraf.havadurumusamp;
/*  www.j a  v a  2  s .c  o m*/
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

import android.util.Log;

public class GeoPlanetDataHandler extends DefaultHandler {

  String woeidNumber = null;
  StringBuffer buffer = null;
  
  @Override
  public void startElement(String uri, String localName, String qName,
      Attributes attributes) throws SAXException {
    if(localName.equals("woeid")) {
      buffer = new StringBuffer();
    }
  }

  @Override
  public void endElement(String uri, String localName, String qName)
      throws SAXException {
    
    if(localName.equals("woeid")) {
      woeidNumber = buffer.toString();
    }
  }

  @Override
  public void characters(char[] ch, int start, int length)
      throws SAXException {
    String myWoeid = new String(ch,start,length);

        if(buffer != null) 
            buffer.append(myWoeid);
  }
  
  
}




Java Source Code List

com.tr.kodgraf.havadurumusamp.GeoPlanetDataHandler.java
com.tr.kodgraf.havadurumusamp.HavaDurumu.java
com.tr.kodgraf.havadurumusamp.XmlDataHandler.java