Skip to content

[Bug]: Values like "603E709" are interpreted as scientific notation and crash the import #524

@cristianbuja

Description

@cristianbuja

Expected behavior

Values extracted from XML (e.g. 603E709) should be treated as strings, unless explicitly cast by the user in a transformer or mapping step.

The DataImporter should not automatically convert XML text nodes into integers/floats based on their format.

Actual behavior

When importing XML files, values such as:

<Code>603E709</Code>

are automatically interpreted as scientific notation by XmlUtils::convertDomElementToArray().
This occurs before mapping and even if the field is not used in the import job.

This leads to:

  • failed imports (fatal errors)
  • data corruption
  • impossible to import certain XML structures without patching the interpreter

Steps to reproduce

Create a simple XML file:

<Items>
    <Item>
        <Code>603E709</Code>
    </Item>
</Items>

Create a DataImporter configuration with:

  • Data source type: XML
  • XPath: /Items/Item

Run the import or import preview.

The importer crashes or produces invalid data because 603E709 is interpreted as a float/scientific notation instead of a string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions