XMLParser Configuration
Configuration object for the XML parser. The configuration is immutable.
Author
AylwardJ
Constructors
Link copied to clipboard
Default parser configuration.
Link copied to clipboard
Configure the parser string processing and use the default CDATA Tag Name as "content".
Link copied to clipboard
Configure the parser string processing to try and convert XML values to JSON values and use the passed CDATA Tag Name the processing value.
Link copied to clipboard
Configure the parser to use custom settings.
Link copied to clipboard
open fun XMLParserConfiguration(keepStrings: Boolean, cDataTagName: String, convertNilAttributeToNull: Boolean)
Configure the parser to use custom settings.
Functions
Link copied to clipboard
The name of the key in a JSON Object that indicates a CDATA section.
Link copied to clipboard
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
)Link copied to clipboard
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)Link copied to clipboard
The name of the key in a JSON Object that indicates a CDATA section.
Link copied to clipboard
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
)Link copied to clipboard
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 arraysLink copied to clipboard
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)Link copied to clipboard
Defines the maximum nesting depth that the parser will descend before throwing an exception when parsing the XML into JSON.
Link copied to clipboard
open fun withXsiTypeMap(xsiTypeMap: Map<String, XMLXsiTypeConverter<out Any>>): XMLParserConfiguration
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