code: public static <T> T  toBean(String xmlStr,Class<T> cls){
          //注意：不是new Xstream(); 否则报错：java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory
          XStream xstream= new XStream(new DomDriver());
          xstream.processAnnotations(cls);
          T obj=(T)xstream.fromXML(xmlStr);
          return obj;
      }
docs: 将传入xml文本转换成Java对象
  @Title: toBean
  @Description: TODO
  @param xmlStr
  @param cls  xml对应的class类
  @return T   xml对应的class类的实例对象
  
  调用的方法实例：PersonBean person=XmlUtil.toBean(xmlStr, PersonBean.class);