public interface XmlManager
XML strings and objects.| Modifier and Type | Method and Description |
|---|---|
JsonObject |
fromXml(String xml)
Deserializes a XML to an
JsonObject. |
<T> T |
fromXml(String xml,
Class<T> clazz)
Deserializes a XML to the given Class.
|
<T> T |
fromXmlInputStream(InputStream inputStream,
Class<T> clazz)
Deserializes a XML inputstream to the given Type.
|
JsonArray |
fromXmlToJsonArray(String xml)
Deserializes a XML to an
JsonArray. |
<T> T |
fromXmlToType(String xml,
Type type)
Deserializes a XML to the given Type.
|
String |
toXml(Object obj)
Converts an object to XML.
|
String |
toXml(Object obj,
boolean pretty)
Converts an object to XML.
|
String toXml(Object obj)
JsonObject, its elements
of type "JsonArray" will have a "isArray='true'" attribute
added. This way, the XML can be deserialized back to a
JsonObject correctly.String toXml(Object obj, boolean pretty)
pretty - If true, the generated XML will
be formatted.JsonObject fromXml(String xml)
JsonObject. This
will correctly manage the XML generated by
toXml(), arrays included.JsonArray fromXmlToJsonArray(String xml)
JsonArray. This
will correctly manage the XML generated by
toXml(), arrays included.<T> T fromXml(String xml, Class<T> clazz)
JsonObject to get the
arrays to work out of the box!<T> T fromXmlToType(String xml, Type type)
JsonObject to get the
arrays to work out of the box!<T> T fromXmlInputStream(InputStream inputStream, Class<T> clazz)
JsonObject to get the
arrays to work out of the box!Copyright © 2016. All rights reserved.