withMaxNestingDepth

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. The default max nesting depth is 512, which means the parser will go as deep as the maximum call stack size allows. Using any negative value as a parameter is equivalent to setting no limit to the nesting depth.

Return

The existing configuration will not be modified. A new configuration is returned.

Parameters

maxNestingDepth

the maximum nesting depth allowed to the XML parser