XML

XML: how to normalize supplier price with spaces and comma

2026-06-05
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

  1. Create an interpreter profile, upload the XML and open the XML editor. The tree shows the file structure with example values.
  2. In the tree, find the price field and click the value (1 200,50) to open the value settings. The Transformations block will appear with an "Add rule" button.
    Setting up transformation rules for the price field in the Eofferix XML editor
    The full process from opening the editor to saving the rules. The ⚡2 icon next to price means two rules are configured.
  3. Add the first rule: action remove spaces. It removes the thousands separator space and turns 1 200,50 into 1200,50.
    Remove spaces rule in the price value settings
    The "remove spaces" action requires no extra parameters — it removes all spaces from the value.
  4. Add the second rule: action replace with, enter a dot in the result field. After this, 1200,50 becomes 1200.50.
    Two rules configured in the price value settings
    Two rules in the Transformations block: first spaces are removed, then the comma is replaced with a dot.
  5. Save the settings. The ⚡2 icon will appear next to price in the editor tree — this confirms two rules are active.
    XML editor after saving — ⚡2 icon next to price
    The ⚡2 icon next to price in the tree — two rules are saved and will be applied during interpretation.
  6. Run the interpretation. In the resulting XML, the <price> element will contain values like 1200.50.

Verified by Evg.

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up