12 most common XML feed errors and how to correct them. Part 1

Article published 30.11.2017
12 most common XML feed errors

When advertising through product campaigns on e.g. comparison shopping services, having an XML feed with correct and up-to-date information is crucial. But that is not often the reality.

We list the most common XML feed errors and provide you with tips on how to correct them. When making corrections you may often find yourself using regular expressions. In case you are not familiar with them, stay tuned as we will provide you with a guide to regular expressions. Or if you get really stuck just let us know and we will be happy to assist.

#1 EAN element contains invalid value

EAN is an important element for product identification, especially when advertising on Google Shopping. If your feed contains this error, try following these steps:

Check if the length of EAN is correct. It should have either 8 or 12-14 characters. To look for products with a different number of characters, go to Products page, choose EAN element, select “does not contain regular expression” condition and use this regular expression: ^(\d{8}|\d{12,14})$


Searching for products containing invalid EAN values.

If you find any products that meet this condition, you can save this product query and in the next step correct it. Either you can look manually at the EAN value of those products and correct it directly in your store. Or if the correct EAN value is mentioned somewhere else in the feed, you can transfer it into the EAN element using the Find and replace rule.

#2 MANUFACTURER element is empty or missing

MANUFACTURER element should contain information about the product manufacturer, however it may happen that this information is mentioned somewhere else in your feed. If that’s the case you can find and copy it from a different element to MANUFACTURER element. But first make sure that your feed contains the MANUFACTURER element at all. If not, you can easily create it in Mergado. On Elements page on the right type MANUFACTURER and hit Add.

How to add a new element in Mergado.

In the next step, with help of rules you can fill this element with the correct information, depending on where it is located. Here we describe several possibilities:

  • In case you have only a few manufacturers - let’s say 20 at the most - you can use queries. First you filter each manufacturer (e.g. by searching for the manufacturer in DESCRIPTION or PRODUCTNAME element) and then for each query you create a rule (Overwrite) that will fill the MANUFACTURER element with the product manufacturer.
Searching for products containing a specific word in an element.
How to create a new rule that will fill an element with text.
  • In case of many manufacturers the previous procedure would be rather lengthy or even impossible so only automation can help. Let’s say the manufacturer name is at the beginning of the PRODUCER element. Start by creating a variable that will be filled with the first word from the PRODUCER element (to create a variable go to Variables page and hit Create variable).
    As regular expression type this: ^[^\s]* in the respective field. This regular expression searches text for any characters up to the first space. In other words it finds the first word in a text. However this expression can only be used for manufacturers with one-word names e.g. Adidas, Nike, Reebok etc.
How to create a new variable.

Then input this variable in the MANUFACTURER element with a rule.

How to create a new rule that will fill an element with a variable.

Add new comment