public final class XmlExtensions extends Object
XmlExtensions.| Modifier and Type | Method and Description |
|---|---|
static InputSource |
getInputSource(String xmlString)
Gets the input source from the given xml string.
|
static String |
newTag(String tagname,
String value,
Map<String,String> attributtes)
Creates a tag from the given string values.
|
static String |
toJson(String xml)
Creates from the given xml string a json string.
|
static String |
toJson(String xml,
Map<String,Class<?>> aliases)
Creates from the given xml string a json string.
|
static <T> T |
toObjectWithXMLDecoder(String xmlString)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXStream(String xml)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXStream(String xml,
Map<String,Class<?>> aliases)
Creates from the given xml string an Object.
|
static <T> T |
toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
String xml)
Creates from the given xml string an java object.
|
static <T> T |
toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
String xml,
Map<String,Class<?>> aliases)
Creates from the given xml string an java object.
|
static <T> String |
toXmlWithXMLEncoder(T obj)
Creates from the given Object an xml string.
|
static <T> String |
toXmlWithXStream(T objectToXML)
Creates from the given Object an xml string.
|
static <T> String |
toXmlWithXStream(T objectToXML,
Map<String,Class<?>> aliases)
Creates from the given Object an xml string.
|
static <T> String |
toXmlWithXStream(com.thoughtworks.xstream.XStream xstream,
T objectToXML)
Creates from the given Object an xml string.
|
static <T> String |
toXmlWithXStream(com.thoughtworks.xstream.XStream xstream,
T objectToXML,
Map<String,Class<?>> aliases)
Creates from the given Object an xml string.
|
public static InputSource getInputSource(String xmlString)
xmlString - the xml stringpublic static String newTag(String tagname, String value, Map<String,String> attributtes)
tagname - the tagnamevalue - the value from the tag.attributtes - a map with the attributtespublic static String toJson(String xml)
xml - the xml string.public static String toJson(String xml, Map<String,Class<?>> aliases)
xml - the xml string.aliases - the aliasespublic static <T> T toObjectWithXMLDecoder(String xmlString)
T - the generic typexmlString - the xml string to transform to an java object.public static <T> T toObjectWithXStream(String xml)
T - the generic type of the return typexml - the xmlpublic static <T> T toObjectWithXStream(String xml, Map<String,Class<?>> aliases)
T - the generic type of the return typexml - the xml stringaliases - the aliasespublic static <T> T toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
String xml)
T - the generic type of the return typexstream - the xstream object.xml - the xmlpublic static <T> T toObjectWithXStream(com.thoughtworks.xstream.XStream xstream,
String xml,
Map<String,Class<?>> aliases)
T - the generic type of the return typexstream - the xstream object.xml - the xmlaliases - the aliasespublic static <T> String toXmlWithXMLEncoder(T obj)
T - the generic type of the return typeobj - the obj to transform to an xml string.public static <T> String toXmlWithXStream(T objectToXML)
T - the generic type of the return typeobjectToXML - the object to xmlpublic static <T> String toXmlWithXStream(T objectToXML, Map<String,Class<?>> aliases)
T - the generic type of the object that will be transformed to xmlobjectToXML - the object to xmlaliases - the aliasespublic static <T> String toXmlWithXStream(com.thoughtworks.xstream.XStream xstream, T objectToXML)
T - the generic type of the object that will be transformed to xmlxstream - the xstream object.objectToXML - the object to xmlpublic static <T> String toXmlWithXStream(com.thoughtworks.xstream.XStream xstream, T objectToXML, Map<String,Class<?>> aliases)
T - the generic type of the return typexstream - the xstreamobjectToXML - the object to xmlaliases - the aliasesCopyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.