public final class XMLUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_REGEX
The Constant TYPE_REGEX.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
get(String xml,
Class<T> klass)
Gets the.
|
static <T> T |
get(String xml,
String regex)
Gets the Object by converting the xml, regex will be used to parse the
class type from attribute in the message.
|
static <T> T |
getByType(String xml)
Gets the object by converting the xml, type
TYPE_REGEX will be
used to parse the class type from attribute in the message. |
static <T> String |
getXML(T type)
Gets the xML.
|
public static final String TYPE_REGEX
public static <T> String getXML(T type) throws JAXBException
T - the generic typetype - the typeJAXBException - the jAXB exceptionpublic static <T> T get(String xml, Class<T> klass) throws JAXBException
T - the generic typexml - the xmlklass - the klassJAXBException - the jAXB exceptionpublic static <T> T getByType(String xml) throws JAXBException
TYPE_REGEX will be
used to parse the class type from attribute in the message.T - the generic typexml - the xmlJAXBException - the jAXB exceptionpublic static <T> T get(String xml, String regex) throws JAXBException
T - the generic typexml - the xmlregex - the regexJAXBException - the jAXB exceptionCopyright © 2016 utils4j. All Rights Reserved.