public class JAXUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
marshal(java.lang.Class<T> entityClass,
java.lang.String xml) |
static <T> java.lang.String |
unmarshal(T entity) |
public static <T> T marshal(java.lang.Class<T> entityClass,
java.lang.String xml)
throws javax.xml.bind.JAXBException
T - the type we want to convert the XML intoentityClass - the class of the parameterized typexml - the instance XML descriptionjavax.xml.bind.JAXBExceptionpublic static <T> java.lang.String unmarshal(T entity)
throws java.lang.Exception
T - the type to serializec - the class of the type to serializeentity - the instance containing the data to serializejava.lang.ExceptionCopyright © 2000 Infostretch Corp.