Optional
arrayOptional
ignoreWhen true the parser will ignore attributes and only parse the node name and value.
false
Optional
ignoreWhen true the parser will ignore namespace prefixes in tags and attributes. The returned object will not contain any namespace prefixes.
false
Optional
skipWhen true the passed string will not be checked if it is a valid XML string. Set to true when you know the string is valid XML and you want to skip the validation. allowing for faster parsing of the XML.
false
Optional
trimWhen true the parser will trim white spaces values of text nodes. When not set defaults to true. When false all whitespace characters from the text node are preserved.
\r\n
is normalized to \n
true
Optional
valueProcess the value of a node before returning it to the node. Useful for converting values to a specific type. If you return undefined the node is ignored.
Value of the node
full path of the node seperated by dots, i.e. rootTag.innerTag
.
For attributes the path is prefixed with @
, i.e. rootTag.innerTag.@attr
When true always return arrays for nodes even if there is only one child node. If false return the node as an object when there is only one child node. Or use a function to determine if the node should be an array or not.