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. Items with a zero price must not appear in the export.

Quick answer

In the XML editor, open the settings for the tsena field and add two rules: remove spaces and replace with a dot. In the export conditions, specify that the price after transformations must be greater than zero.

Before / after

Before

XML
<tovar>
  <artikul>SKU-1</artikul>
  <tsena>1 200,50</tsena>
  <ostatok>8</ostatok>
</tovar>
<tovar>
  <artikul>SKU-3</artikul>
  <tsena>0,00</tsena>
  <ostatok>0</ostatok>
</tovar>

After

CSV
sku,price,stock
SKU-1,1200.50,8

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 tsena 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 tsena field in the Eofferix XML editor
    The full process from opening the editor to saving the rules. The ⚡2 icon next to tsena 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 tsena 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 tsena value settings
    Two rules in the Transformations block: first spaces are removed, then the comma is replaced with a dot.
  5. In the same window, open the Export conditions block and add a condition: switch to whole item, select the tsena field, phase after transformations, operator greater than, value 0. Items with a zero price will no longer appear in the result.
  6. Save the settings. The ⚡2 icon will appear next to tsena in the editor tree — this confirms two rules are active.
    XML editor after saving — ⚡2 icon next to tsena
    The ⚡2 icon next to tsena in the tree — two rules are saved and will be applied during interpretation.
  7. Run the interpretation. In the resulting CSV the price column will contain values like 1200.50, and rows with a zero price will be excluded.

Verified by Evg.

Process data faster with Eofferix

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

Sign up