We have extended the limits of our tool and are launching Mergado 2. Simplifying ad management, speeding up functionalities, and adding the tools you’ve been asking for. In this article, we’ll introduce you to the major changes.
What is the difference between the original and the new version of Mergado
Our original version of the approach to working with XML limited us in several ways. Whether in storing data, working with embedded and multiple elements, processing attributes, or loading formats.
All this led us to the idea of abandoning this method of processing and using tools that were created directly for working with XML.
What the changes affect
Changes affects the entire regeneration process:
- import
- applying the rules
- export
What will change
1. Elements
- for each element, there can be any number of values (currently only one value)
- we distinguish sizes in element names (the current version cannot do this)
- we store the values of “empty” elements
- we distinguish the values of parent -> child elements (the current version cannot do this)
- we upload a product with any structure
- we allow working with attributes (<CATEGORY lang=“eng”>; where lang is an attribute)
- the option to arrange elements according to your own needs or format requirements
Working with elements
Nothing changes for simple elements. To work with more complex ones, we have developed our own language, which we call Element-Path.
Examples on a specific product:
1. <ITEM id=“1”>
2. <NAME>Sample product</NAME>
3. <IMAGE>https://www.imgurl.com/1/</IMAGE>
4. <IMAGE>https://www.imgurl.com/2/</IMAGE>
5. <IMAGE>https://www.imgurl.com/3/</IMAGE>
6. <PRICE>30 EUROS</PRICE>
7. <DESCRIPTION lang=“en”>
8. Suitable for demonstrating the correct use of Element-Path
9. </DESCRIPTION>
10. <DESCRIPTION lang=“de”>
11. Sample german language value.
12. </DESCRIPTION>
13. <PARAM>
14. <NAME>Color</NAME>
15. <VAL>black</VAL>
16. </PARAM>
17. <PARAM>
18. <NAME>Material</NAME>
19. <VAL>100% cotton</VAL>
20. </PARAM>
21 </ITEM>
Different element-paths:
NAME: returns the value from line 2.
@id: returns the value from line 1.
IMAGE: returns values from lines 3., 4., 5.
IMAGE { @@POSITION = 2 }: returns the value from line 4.
IMAGE { @@POSITION = 4 }: returns nothing
DESCRIPTION { @lang = “en” }: returns the value from line 8.
DESCRIPTION | @lang: returns values from lines 7., 10.
PARAM { NAME = “Color” } | VAL: returns value from line 15.
PARAM { @@POSITION = 2 or NAME = “Color” } | VAL: returns values from lines 15., 19.
PARAM { VAL = “100% cotton” } | VAL: returns the value from line 19.
PARAM | NAME: returns values from lines 14., 18.
PARAM | NAME { @@POSITION = 1 }: returns values from lines 14., 18.
PARAM | NAME { @@POSITION = 2 }: returns nothing