vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Interface XMLStringfyOptions

    Options for controlling XML string conversion behavior.

    XMLStringfyOptions

    interface XMLStringfyOptions {
        attributePrefix?: string;
        headless?: boolean;
        indent?: string | number;
        stripEmptyNodes?: boolean;
        trimValues?: boolean;
    }
    Index

    Properties

    attributePrefix?: string

    Defines the name of the node to use for attributes in the XML string. The default is $ for attributes groups.

    For example { attributePrefix: '@attributes' } with the following JSON:

    "tag": {
    "@attributes": {
    "attr": "value"
    }
    }

    Will result in the following XML:

    <innerTag attr="value" />
    
    headless?: boolean

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

    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.

    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.

    \r\n is normalized to \n

    true