Skip to content

Type overrides for XMLProvider #1323

@Rimobul

Description

@Rimobul

In certain cases, the XmlProvider infers an incorrect type. For example:

<postalCode>10900</postalCode>

Is parsed as an integer. This creates errors when parsing postal codes starting with 0, e.g.: 01015. I have tried adding a dummy postal code into my data:

<postalCode>ABCDE</postalCode>

but this has only resulted in a bigger mess, where the value can be either an Option<string> or Option<int>. Unfortunately, we have no XSD schemas available and reverse engineering them would take too much time, as there is a large amount of different XML files.

Could you add a way to override the type of an XML element? Perhaps, similarly to how you can rename fields in the CsvProvider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions