Modifier and Type | Field and Description |
---|---|
static XMLParserConfiguration |
XMLParserConfiguration.KEEP_STRINGS
Original configuration of the XML Parser except that values are kept as strings.
|
static XMLParserConfiguration |
XMLParserConfiguration.ORIGINAL
Original Configuration of the XML Parser.
|
Modifier and Type | Method and Description |
---|---|
protected XMLParserConfiguration |
XMLParserConfiguration.clone()
Provides a new instance of the same configuration.
|
XMLParserConfiguration |
XMLParserConfiguration.withcDataTagName(java.lang.String newVal)
The name of the key in a JSON Object that indicates a CDATA section.
|
XMLParserConfiguration |
XMLParserConfiguration.withConvertNilAttributeToNull(boolean newVal)
When parsing the XML into JSON, specifies if values with attribute xsi:nil="true"
should be kept as attribute(
false ), or they should be converted to
null (true ) |
XMLParserConfiguration |
XMLParserConfiguration.withForceList(java.util.Set<java.lang.String> forceList)
When parsing the XML into JSON, specifies that tags that will be converted to arrays
in this configuration
Set<String> to parse the provided tags' values as arrays |
XMLParserConfiguration |
XMLParserConfiguration.withKeepStrings(boolean newVal)
When parsing the XML into JSON, specifies if values should be kept as strings (
true ), or if
they should try to be guessed into JSON values (numeric, boolean, string) |
XMLParserConfiguration |
XMLParserConfiguration.withXsiTypeMap(java.util.Map<java.lang.String,XMLXsiTypeConverter<?>> xsiTypeMap)
When parsing the XML into JSON, specifies that the values with attribute xsi:type
will be converted to target type defined to client in this configuration
Map<String, XMLXsiTypeConverter<?>> to parse values with attribute
xsi:type="integer" as integer, xsi:type="string" as string |
Modifier and Type | Method and Description |
---|---|
static JSONObject |
XML.toJSONObject(java.io.Reader reader,
XMLParserConfiguration config)
Convert a well-formed (but not necessarily valid) XML into a
JSONObject.
|
static JSONObject |
XML.toJSONObject(java.lang.String string,
XMLParserConfiguration config)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject.
|
static java.lang.String |
XML.toString(java.lang.Object object,
java.lang.String tagName,
XMLParserConfiguration config)
Convert a JSONObject into a well-formed, element-normal XML string.
|
Copyright © 2022. All Rights Reserved.