public static < T > T unmarshal ( Class < T > cl , Source s ) throws JAXBException { JAXBContext ctx = JAXBContext . newInstance ( cl ) ; Unmarshaller u = ctx . createUnmarshaller ( ) ; return u . unmarshal ( s , cl ) . getValue ( ) ; }
Convert the contents of a Source to an object of a given class .