XMLParserConfiguration

Configuration object for the XML parser. The configuration is immutable.

Author

AylwardJ

Constructors

Link copied to clipboard
Default parser configuration.
Link copied to clipboard
open fun XMLParserConfiguration(keepStrings: Boolean)
Configure the parser string processing and use the default CDATA Tag Name as "content".
Link copied to clipboard
open fun XMLParserConfiguration(cDataTagName: String)
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
open fun XMLParserConfiguration(keepStrings: Boolean, cDataTagName: String)
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 arrays
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
open fun withMaxNestingDepth(maxNestingDepth: Int): XMLParserConfiguration
Defines the maximum nesting depth that the parser will descend before throwing an exception when parsing the XML into JSON.
Link copied to clipboard
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

Properties

Link copied to clipboard
The default maximum nesting depth when parsing a XML document to JSON.
Link copied to clipboard
open val forceList: Set<String>
When parsing the XML into JSON, specifies the tags whose values should be converted to arrays
Link copied to clipboard
Original configuration of the XML Parser except that values are kept as strings.
Link copied to clipboard
When parsing the XML into JSON, specifies the tags whose values should be converted to arrays
Link copied to clipboard
Original Configuration of the XML Parser.
Link copied to clipboard
Used to indicate there's no defined limit to the maximum nesting depth when parsing a XML document to JSON.
Link copied to clipboard
This will allow type conversion for values in XML if xsi:type attribute is defined