Documentation / @sw-file-lib/xml / xml-schema / SchemaParseOptions
Interface: SchemaParseOptions
interface SchemaParseOptions {
readonly unknownField?: UnknownFieldMode | UnknownFieldCallback;
readonly allowNaN?: boolean;
readonly duplicateChildElement?: DuplicateChildElementMode | DuplicateChildElementCallback;
}Defined in: packages/xml/src/xml-schema/parseOptions.ts:109
Options controlling the behavior of schema parsing when the XML does not exactly match the schema.
Unless otherwise specified, parsing errors are reported rather than silently ignored.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
| Determines how attributes and child elements that are not defined by the schema are handled. A callback can be provided to make the decision based on the location and contents of each unknown field. Default ts | ||
|
| Determines whether a value that cannot be interpreted as a number is allowed to produce By default, such values cause a parsing error. Set this to Default ts Example ts | |
| Determines how duplicate child elements are handled when the schema expects a unique child element. A callback can be provided to make the decision based on the location of each duplicate child element. Default ts |