67,549
社区成员




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)
}