Exemplo n.º 1
0
  @Override
  public void startElement(String uri, String localName, String qName, Attributes attributes)
      throws SAXException {
    // TODO Auto-generated method stub

    if (localName.equals("city")) {
      String city = attributes.getValue("data");
      info.setCity(city);
    } else if (localName.equals("temp_f")) {
      String temp = attributes.getValue("data");
      info.setTemp(Integer.parseInt(temp));
    }
  }
Exemplo n.º 2
0
 public String getInformation() {
   // TODO Auto-generated method stub
   return info.dataToString();
 }