Here you can find the source of unmarshal(String xml, Class
public static <T> T unmarshal(String xml, Class<T> clazz)
//package com.java2s; //License from project: Apache License import javax.xml.bind.JAXB; import java.io.StringReader; public class Main { public static <T> T unmarshal(String xml, Class<T> clazz) { return JAXB.unmarshal(new StringReader(xml), clazz); }/* w w w . jav a 2s.co m*/ }