xstream解析xml
private void getdata() { new Thread(){ public void run() { String str=MyUtils.Check_xml(MyUtils.url); XStream xStream=new XStream(); xStream.processAnnotations(SuperNews.class); SuperNews sn=(SuperNews) xStream.fromXML(str); List<Tweet> list=sn.getTweets().getTweet(); handler.sendMessage(handler.obtainMessage(1, list)); }; }.start(); }