6.7w+
社区成员
public static Object XmlToBean(String xml,Class parent,Class child) throws JAXBException{
JAXBContext context = JAXBContext.newInstance(parent,child);
Unmarshaller unmarshaller = context.createUnmarshaller();
return JAXB.unmarshal(new StringReader(xml),child)
}