public final class XmlExtensions extends Object
XmlExtensions.| Constructor and Description |
|---|
XmlExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static InputSource |
getInputSource(String xmlString)
Gets the input source from the given xml string.
|
static <T> T |
loadObject(File xmlFile)
Load from the given file name that should represent an xml file and transform it to the
generic type object.
|
static <T> T |
loadObject(String xmlFileName)
Load from the given file name that should represent an xml file and transform it to the
generic type object.
|
static String |
newTag(String tagname,
String value,
Map<String,String> attributes)
Creates a tag from the given string values.
|
static String |
toJson(String xmlString)
Deprecated.
use instead the same name method in class
XmlToJsonExtensions Note: will be removed on next minor release |
static String |
toJson(String xmlString,
Map<String,Class<?>> aliases)
Deprecated.
use instead the same name method in class
XmlToJsonExtensions Note: will be removed on next minor release |
static <T> T |
toObjectWithXMLDecoder(String xmlString)
Deprecated.
use instead the same name method in class
XmlToObjectExtensions Note: will be removed on next minor release |
static <T> T |
toObjectWithXStream(String xmlString)
Deprecated.
use instead the same name method in class
XmlToObjectExtensions Note: will be removed on next minor release |
static <T> T |
toObjectWithXStream(String xmlString,
Map<String,Class<?>> aliases)
Deprecated.
use instead the same name method in class
XmlToObjectExtensions Note: will be removed on next minor release |
static <T> T |
toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
String xmlString)
Deprecated.
use instead the same name method in class
XmlToObjectExtensions Note: will be removed on next minor release |
static <T> T |
toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
String xmlString,
Map<String,Class<?>> aliases)
Deprecated.
use instead the same name method in class
XmlToObjectExtensions Note: will be removed on next minor release |
static <T> String |
toXmlWithXMLEncoder(T obj)
Deprecated.
use instead the same name method in class
ObjectToXmlExtensions Note: will be removed on next minor release |
static <T> String |
toXmlWithXStream(T objectToXML)
Deprecated.
use instead the same name method in class
ObjectToXmlExtensions Note: will be removed on next minor release |
static <T> String |
toXmlWithXStream(T objectToXML,
Map<String,Class<?>> aliases)
Deprecated.
use instead the same name method in class
ObjectToXmlExtensions Note: will be removed on next minor release |
static <T> String |
toXmlWithXStream(com.thoughtworks.xstream.XStream xstream,
T objectToXML)
Deprecated.
use instead the same name method in class
ObjectToXmlExtensions Note: will be removed on next minor release |
static <T> String |
toXmlWithXStream(com.thoughtworks.xstream.XStream xstream,
T objectToXML,
Map<String,Class<?>> aliases)
Deprecated.
use instead the same name method in class
ObjectToXmlExtensions Note: will be removed on next minor release |
public static InputSource getInputSource(String xmlString)
xmlString - the xml as string objectpublic static <T> T loadObject(File xmlFile) throws IOException
T - the generic typexmlFile - the xml fileIOException - Signals that an I/O exception has occurred.public static <T> T loadObject(String xmlFileName) throws IOException
T - the generic typexmlFileName - the xml file nameIOException - Signals that an I/O exception has occurred.public static String newTag(String tagname, String value, Map<String,String> attributes)
tagname - the tag namevalue - the value from the tagattributes - a map with the attributes@Deprecated public static String toJson(String xmlString)
XmlToJsonExtensions xmlString - the xml as string object@Deprecated public static String toJson(String xmlString, Map<String,Class<?>> aliases)
XmlToJsonExtensions xmlString - the xml as string objectaliases - the aliases@Deprecated public static <T> T toObjectWithXMLDecoder(String xmlString)
XmlToObjectExtensions T - the generic typexmlString - the xml string to transform to an java object.@Deprecated public static <T> T toObjectWithXStream(String xmlString)
XmlToObjectExtensions T - the generic type of the return typexmlString - the xml as string object@Deprecated public static <T> T toObjectWithXStream(String xmlString, Map<String,Class<?>> aliases)
XmlToObjectExtensions T - the generic type of the return typexmlString - the xml as string objectaliases - the aliases@Deprecated public static <T> T toObjectWithXStream(com.thoughtworks.xstream.XStream xstream, String xmlString)
XmlToObjectExtensions T - the generic type of the return typexstream - the xstream object.xmlString - the xml as string object@Deprecated public static <T> T toObjectWithXStream(com.thoughtworks.xstream.XStream xstream, String xmlString, Map<String,Class<?>> aliases)
XmlToObjectExtensions T - the generic type of the return typexstream - the xstream object.xmlString - the xmlaliases - the aliases@Deprecated public static <T> String toXmlWithXMLEncoder(T obj) throws IOException
ObjectToXmlExtensions T - the generic type of the return typeobj - the obj to transform to an xml string.IOException - Signals that an I/O exception has occurred@Deprecated public static <T> String toXmlWithXStream(T objectToXML)
ObjectToXmlExtensions T - the generic type of the return typeobjectToXML - the object to xml@Deprecated public static <T> String toXmlWithXStream(T objectToXML, Map<String,Class<?>> aliases)
ObjectToXmlExtensions T - the generic type of the object that will be transformed to xmlobjectToXML - the object to xmlaliases - the aliases@Deprecated public static <T> String toXmlWithXStream(com.thoughtworks.xstream.XStream xstream, T objectToXML)
ObjectToXmlExtensions T - the generic type of the object that will be transformed to xmlxstream - the xstream object.objectToXML - the object to xml@Deprecated public static <T> String toXmlWithXStream(com.thoughtworks.xstream.XStream xstream, T objectToXML, Map<String,Class<?>> aliases)
ObjectToXmlExtensions T - the generic type of the return typexstream - the xstreamobjectToXML - the object to xmlaliases - the aliasesCopyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.