List of utility methods to do XML JAXB Unmarshaller
Object | unmarshal(InputStream is, Class> clazz) unmarshal try { JAXBContext jaxbContext = JAXBContext.newInstance(clazz); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); Object object = unmarshaller.unmarshal(is); return object; } catch (JAXBException e) { throw new RuntimeException("Error unmarshalling object", e); |
O | unmarshal(InputStream stream, Class Unmarshal an arbitrary object with JAXB. return JAXB.unmarshal(stream, clazz);
|
T | unmarshal(JAXBContext context, Class unmarshal if (source == null) { return null; StringReader reader = new StringReader(source); if (context == null) { context = JAXBContext.newInstance(clazz); Unmarshaller un = context.createUnmarshaller(); ... |
Object | unmarshal(JAXBContext jaxbContext, XMLStreamReader xmlStreamReader) unmarshal Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
return unmarshaller.unmarshal(xmlStreamReader);
|
Object | unmarshal(org.w3c.dom.Element elem, Class> c) unmarshal Object result = null;
JAXBContext jc = getContext(c);
Unmarshaller um = jc.createUnmarshaller();
result = um.unmarshal(elem);
return result;
|
Object | unmarshal(org.w3c.dom.Element elem, Class> c) unmarshal Object result = null;
JAXBContext jc = JAXBContext.newInstance(c);
Unmarshaller um = jc.createUnmarshaller();
result = um.unmarshal(elem);
return result;
|
T | unmarshal(String b, Class Convert XML data to a bean using JAXB. Class<?>[] bind; if (bc.length > 1) { bind = new Class<?>[bc.length + 1]; bind[0] = implClass; for (int i = 0; i < bc.length; i++) { bind[i + 1] = bc[i]; } else { ... |
T | unmarshal(String content, Class Unmarshal class. JAXBContext jc = JAXBContext.newInstance(clasz); Unmarshaller u = jc.createUnmarshaller(); Object o = null; byte[] _res = null; _res = content.getBytes("UTF-8"); String __str = ""; __str = new String(_res, "UTF-8"); StringBuffer xmlStr = new StringBuffer((!__str.startsWith("<") ? __str.substring(3) : __str)); ... |
Object | unMarshal(String contextPath, InputStream xmlStream) un Marshal JAXBContext jc = JAXBContext.newInstance(contextPath);
Unmarshaller u = jc.createUnmarshaller();
return u.unmarshal(xmlStream);
|
T | unmarshal(String ObjXml, Class unmarshal JAXBContext bContext = JAXBContext.newInstance(configurationClass); Unmarshaller um = bContext.createUnmarshaller(); T obj = (T) um.unmarshal(new StringReader(ObjXml)); return obj; |