Nestable Data Paths in Generic XML Example
In the following example, the data set contains a product which has multiple references of type AccessoryRequired, to accessory products. Each accessory product has multiple references of type ProductImage, to assets.
Using Nested Data Paths when mapping will produce an export that includes all of the IDs shown above, in the following levels:
- Level 1 Product tag including the ID and Name of the product selected for export
- Level 2 Accessory tag including the ID, Name and Description for each product with an AccessoryRequired reference type
- Level 3 Image tag including the ID and Name for each image with a ProductImage reference type
Template
Choose Generic XML for Format and provide the
<Products>
<Product>
<?Product?>
<ID><?Target?></ID>
<Name><?Target?></Name>
<Accessory>
<?MultiTarget?>
<ID><?Target AccessoryReqID?></ID>
<Name><?Target AccessoryReqName?></Name>
<Description><?Target AccessoryReqDescription?></Description>
<Image>
<?MultiTarget?>
<ID><?Target ProductImageID?></ID>
<Name><?Target ProductImageName?></Name>
</Image>
</Accessory>
</Product>
</Products>
Data Path Configuration
The mapping target structure resulting from the above template is:
Target/Structure | Data Source | Configuration |
---|---|---|
ID | ID | |
Name | Name | |
Accessory | Data Path | Data Path=Reference 'AccessoryRequired', Reference Target (composite, multiple-cardinality) |
AccessoryReqID | ID | |
AccessoryReqName | Name | |
AccessoryReqDescription | Attribute | Select Attribute='Description, Web' Value and unit |
Image | Data Path | Data Path=Reference 'ProductImage', Reference Target (composite, multiple-cardinality) |
ProductImageID | ID | |
ProductImageName | Name |
|
Mapping
For step-by-step mapping instructions, refer to the Mapping for Nestable Data Paths in Generic XML Example topic.
Results