Supplier catalogs

How to extract size from CommerceML ХарактеристикиТовара

2026-06-29
Task

CommerceML stores characteristics as Наименование and Значение pairs. The import needs a separate <Размер> node without mixing in Color, and the source ХарактеристикаТовара helper block should not be exported.

Short answer

Create a new <Размер> node inside Товар, then configure it to take the Значение value from the characteristic where Наименование equals Size. Instead of a regular expression, use Equals Size or Contains substring Size; ^Size$ only checks an exact full match.

How to do it in Eofferix

  1. Inside the repeated Товар node, create a new child node <Размер>.

  2. Open the settings of the new <Размер> node.

    Opening XML value settings
    The settings are applied to the output node that will be filled before export.
  3. Method 1: to fill the new <Размер> node, add a condition on Наименование: Equals Size.

    Equals condition for Size characteristic
    This takes the value only from the characteristic with the exact size label.
  4. Method 2: if the supplier writes, for example, Clothing size, use Наименование Contains substring Size.

    Contains substring condition for Size
    This variant is useful when the characteristic name is longer than one word.
  5. Method 3: keep regular expression ^Size$ (matches the full size label) as the strict option.

    Regex condition for Size
    The regular expression is needed only for a strict exact-match check.
  6. On the source ХарактеристикаТовара block, remove the size row from export or do not export the whole helper block if it is no longer needed.

Before / after

Before

source data
<КоммерческаяИнформация ВерсияСхемы="2.10">
  <Каталог>
    <Товары>
      <Товар>
        <Ид>SKU-4001</Ид>
        <Наименование>Hudson lamp</Наименование>
        <ХарактеристикиТовара>
          <ХарактеристикаТовара>
            <Наименование>Size</Наименование>
            <Значение>M</Значение>
          </ХарактеристикаТовара>
          <ХарактеристикаТовара>
            <Наименование>Color</Наименование>
            <Значение>white</Значение>
          </ХарактеристикаТовара>
        </ХарактеристикиТовара>
      </Товар>
    </Товары>
  </Каталог>
</КоммерческаяИнформация>

After

result
<КоммерческаяИнформация ВерсияСхемы="2.10">
  <Каталог>
    <Товары>
      <Товар>
        <Ид>SKU-4001</Ид>
        <Наименование>Hudson lamp</Наименование>
        <Размер>M</Размер>
      </Товар>
      <Товар>
        <Ид>SKU-4002</Ид>
        <Наименование>Parker chair</Наименование>
        <Размер>L</Размер>
      </Товар>
    </Товары>
  </Каталог>
</КоммерческаяИнформация>

Process data faster with Eofferix

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

Sign up