public class XMLConverter extends Object
| Constructor and Description |
|---|
XMLConverter() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertToXML(Object obj) |
static String |
convertToXML(Object obj,
boolean prettyPrint) |
static Node |
convertToXMLNode(Object obj) |
static <T> T |
fromXML(Node node,
Class<T> clazz) |
static <T> T |
fromXML(String xml,
Class<T> clazz) |
static <T> T |
fromXMLNamespaced(String xml,
Class<T> clazz) |
static String |
nodeToString(Node node) |
static String |
nodeToString(Node node,
boolean pretty) |
static Node |
stringToNode(String str) |
public static String convertToXML(Object obj) throws JAXBException
JAXBExceptionpublic static String convertToXML(Object obj, boolean prettyPrint) throws JAXBException
JAXBExceptionpublic static Node convertToXMLNode(Object obj) throws JAXBException, ParserConfigurationException
public static <T> T fromXMLNamespaced(String xml, Class<T> clazz) throws JAXBException
JAXBExceptionpublic static <T> T fromXML(String xml, Class<T> clazz) throws JAXBException
JAXBExceptionpublic static <T> T fromXML(Node node, Class<T> clazz) throws JAXBException
JAXBExceptionCopyright © 2017. All Rights Reserved.