public class Xml extends Object
Constructor and Description |
---|
Xml() |
Modifier and Type | Method and Description |
---|---|
static String |
marshal(Object source)
This marshal method will traverse the provided object checking for field annotations in order
to compose the XML data.
|
static <T> T |
unmarshal(Class<? extends T> type,
Reader source)
This unmarshal method will read the contents of the XML document from the provided source and
populate the object with the values deserialized.
|
static <T> T |
unmarshal(Class<? extends T> type,
String source)
This unmarshal method will read the contents of the XML document from the provided source and
populate the object with the values deserialized.
|
static boolean |
validate(Class type,
String source)
This validate method will validate the contents of the XML document against the specified XML
class schema.
|
public static String marshal(Object source) throws XmlParserException
XmlParserException
public static <T> T unmarshal(Class<? extends T> type, Reader source) throws XmlParserException
XmlParserException
public static <T> T unmarshal(Class<? extends T> type, String source) throws XmlParserException
XmlParserException
public static boolean validate(Class type, String source) throws XmlParserException
XmlParserException