XStream解析
xmlstr转化为对象
XStream xstream=new XStream();
xstream.autodetectAnnotations(true);
xstream.alias("User",User.class);
(User)xstream.fromXML(xmlstr);
对象转化为XML
XStream xstream=new XStream();
xstream.processAnnotations(User.class);
...
xstream.toXML(user);