Interface MappedElementsRule

interface MappedElementsRule {
    array: boolean;
    localPart: string;
    maxOccurs: null | number;
    minOccurs: number;
    namespaceUri: null | string;
    property: string | number | symbol;
    rules: (() => MappedXmlRules<any>);
    useEmptyArrays: boolean;
}

Properties

array: boolean

True if the parsed elements should populate into an array.

localPart: string

The local part of the QName.

maxOccurs: null | number

The maximum number of elements. Use null for unbounded.

minOccurs: number

The minimum number of elements.

namespaceUri: null | string

The namespace uri that must match.

property: string | number | symbol

The name of the property to set on the parent element.

rules: (() => MappedXmlRules<any>)

Returns the mappings for matched element(s).

useEmptyArrays: boolean

If true and there are 0 occurrences of the element, the parsed value will be an empty array instead of undefined.