pull解析XML try {
List<WeatherInfos> infos = weatherService.getWeatherInfos(MainActivity.class.getClassLoader().getResourceAsStream("z.xml"));
StringBuffer sb = new StringBuffer();
for(WeatherInfos info : infos){
String str = info.toString();
sb.append(str);
sb.append("/n");
}
tV.setText(sb.toString());
Toast.makeText(this,"解析成功",0);
} catch (Exception e) {
// TODO: handle exception
Toast.makeText(this,"解析失败",0);
}