SAX を使用して Google 天気 API から情報を取得していますが、「条件」に問題があります。
具体的には、次のコードを使用しています。
public void startElement (String uri, String name, String qName, Attributes atts) {
if (qName.compareTo("condition") == 0) {
String cCond = atts.getValue(0);
System.out.println("Current Conditions: " + cCond);
currentConditions.add(cCond);
}
次のようなものから XML をプルするには:
http://www.google.com/ig/api?weather=ボストン+マサチューセッツ州
その間、私は現在の日付のみの条件を取得しようとしています。将来の日付ではありません。
XML ファイルの内容に基づいて現在のデータのみをプルするために、xml に入れることができるチェックはありますか?
ありがとう!