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:
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.