Supplier catalogs

How to extract a CommerceML property value by ID

2026-06-29
Task

CommerceML product properties are stored in ЗначенияСвойств: country and warranty sit next to each other. The import needs only the country value with ID prop-country.

Short answer

Open Значение inside ЗначенияСвойства and add a condition on Ид: regular expression ^prop-country$ (matches a value that is exactly prop-country).

How to do it in Eofferix

  1. In the XML snapshot, select the Значение value inside the repeated block.

  2. Open the value settings.

    Opening value settings
    The animation shows opening settings for the selected value.
  3. Add an export condition on Ид: Ид ^prop-country$.

    Value condition
    This makes Eofferix take the value only from the needed repeated block.

Before / after

Before

source data
<КоммерческаяИнформация ВерсияСхемы="2.10">
  <Каталог>
    <Товары>
      <Товар>
        <Ид>SKU-28001</Ид><Наименование>Hudson lamp</Наименование>
        <ЗначенияСвойств>
          <ЗначенияСвойства><Ид>prop-country</Ид><Значение>United States</Значение></ЗначенияСвойства>
          <ЗначенияСвойства><Ид>prop-warranty</Ид><Значение>24</Значение></ЗначенияСвойства>
        </ЗначенияСвойств>
      </Товар>
      <Товар>
        <Ид>SKU-28002</Ид><Наименование>Parker chair</Наименование>
        <ЗначенияСвойств>
          <ЗначенияСвойства><Ид>prop-country</Ид><Значение>Canada</Значение></ЗначенияСвойства>
          <ЗначенияСвойства><Ид>prop-warranty</Ид><Значение>12</Значение></ЗначенияСвойства>
        </ЗначенияСвойств>
      </Товар>
    </Товары>
  </Каталог>
</КоммерческаяИнформация>

After

result
<Товары>
  <Товар><Ид>SKU-28001</Ид><Наименование>Hudson lamp</Наименование><Страна>United States</Страна></Товар>
  <Товар><Ид>SKU-28002</Ид><Наименование>Parker chair</Наименование><Страна>Canada</Страна></Товар>
</Товары>

What to keep in mind

  • If the property ID is one exact value, use equals without a regular expression.
  • CommerceML tag names are kept as they appear in the 1C export; they are part of the format.

Process data faster with Eofferix

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

Sign up