Interface XMLStringfyOptions

Options for controlling XML string conversion behavior.

XMLStringfyOptions

Hierarchy

  • XMLStringfyOptions

Properties

attributePrefix?: string

Defines the prefix to use for attributes in the XML string. The default is @ for attributes groups.

headless?: boolean

When true the XML string will be without a XML declaration.

Default

false
indent?: string | number

The indent prefix to use for the XML indentation. When not set the XML tags are not indented and no new lines are added. When set to a number the XML string will be indented with the specified number of spaces or the specified string.

Default

false
stripEmptyNodes?: boolean

When true empty nodes are removed when stringifying the XML.

trimValues?: boolean

When true the parser will ignore attributes and only parse the node name and value.

Remark

\r\n is normalized to \n

Default

true