Task
The supplier sends XML where the price is written as 1 200,50 — with a thousands space and a comma instead of a decimal point. The import system expects 1200.50.
Quick answer
In the XML editor, open the settings for the price field and add two rules: remove spaces and replace with a dot.
What matters for the result
- Keep the cleanup order: remove spaces first, then replace comma with dot.
- Do not add a zero-price condition when the task is only to normalize the number format.
- After saving, test a price with a thousands separator and a price without cents; both should remain valid.
Before / after
Before
XML<product>
<sku>SKU-1</sku>
<price>1 200,50</price>
<stock>8</stock>
</product>After
XML<product>
<sku>SKU-1</sku>
<price>1200.50</price>
<stock>8</stock>
</product>How to do it in Eofferix
- Create an interpreter profile, upload the XML and open the XML editor. The tree shows the file structure with example values.
- In the tree, find the
pricefield and click the value (1 200,50) to open the value settings. The Transformations block will appear with an "Add rule" button.
The full process from opening the editor to saving the rules. The ⚡2 icon next to price means two rules are configured. - Add the first rule: action remove spaces. It removes the thousands separator space and turns
1 200,50into1200,50.
The "remove spaces" action requires no extra parameters — it removes all spaces from the value. - Add the second rule: action replace with, enter a dot in the result field. After this,
1200,50becomes1200.50.
Two rules in the Transformations block: first spaces are removed, then the comma is replaced with a dot. - Save the settings. The ⚡2 icon will appear next to
pricein the editor tree — this confirms two rules are active.
The ⚡2 icon next to price in the tree — two rules are saved and will be applied during interpretation. - Run the interpretation. In the resulting XML, the
<price>element will contain values like1200.50.
Verified by Evg.