Thank you for helping! In your example, a feed is generated for one category, I have a different situation
The category structure looks like this:
Leather chairs (category)
— product 1
— product 2
— product 3
Blue chairs (category)
— product 2
— product 4
“Product 2” is in 2 categories at once, and therefore the feed now displays it in the form
<offer id="182" available="true">
<url>https://.... </url>
<price>98</price>
<currencyId>USD</currencyId>
<categoryId>112</categoryId>
<categoryId>121</categoryId>
<name>product 2</name>
<picture>https://....jpg</picture>
</offer>
As you can see from the xml code, the codes for both categories are provided.
<categoryId>112</categoryId>
<categoryId>121</categoryId>
The site receiving the feed requires that each product have only one category specified. In my case, it doesn’t matter which category is indicated, the main thing is that each product has one category.
I need to leave only one category and exclude all others.
As a result I should get:
<offer id="182" available="true">
<url>https://.... </url>
<price>98</price>
<currencyId>USD</currencyId>
<categoryId>112</categoryId>
<name>product 2</name>
<picture>https://....jpg</picture>
</offer>