public class XMLAdapter extends Object
| Constructor and Description |
|---|
XMLAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static String |
toXMLString(Object o)
Converts a JSON AgenaRisk 10 model to its XML representation.
|
static String |
toXMLString(Object o,
String wrapper)
Converts an object to its XML representation.
|
static org.json.JSONObject |
xmlToJson(String xmlString)
Parses XML string to JSONObject and then formats the JSONObject to conform to AgenaRisk 10 JSON model format.
|
public static org.json.JSONObject xmlToJson(String xmlString) throws AdapterException
xmlString - XML string to parseAdapterException - if invalid XML structure or unexpected valuespublic static String toXMLString(Object o)
o - object in JSON format (JSONObject, JSONArray, JsonObject, JsonArray, etc)public static String toXMLString(Object o, String wrapper)
o - object in JSON formatwrapper - additional wrapper to use when convertingCopyright © 2023. All rights reserved.