Skip to content

Documentation / @sw-file-lib/xml / xml-schema / DuplicateChildElementMode

Type Alias: DuplicateChildElementMode ​

ts
type DuplicateChildElementMode = "error" | "last" | "first";

Defined in: packages/xml/src/xml-schema/parseOptions.ts:81

Determines how a duplicate child element is handled when the schema expects at most one element with a given tag.

  • "error": Stop parsing and report an error.
  • "first": Use the first occurrence and ignore subsequent occurrences.
  • "last": Use the last occurrence and ignore previous occurrences.