To create a simple XML export
- How do I create a simple XML export?
- What repositories do I need to create?
- What mapping lines do I need to create?
- How do I filter the item variant lines?
- How do I save the list of items to an XML file?
- How do I indent the item variant in the XML file?
Pointe
Summary: This chapter provides instructions for creating a simple XML export in the COSMO Data Integration Framework. This includes creating the four required Repositories, Mapping Lines, and selecting the appropriate Line Actions and Filters. The Process action is used to save the complete list of Items and Item Variants to one XML file.
In this example, all Items and Item Variants are exported to an XML file.
- Create a Mapping (like ITEM2XML) and a Mapping Version (like Item Export).
- Create the four required Repositories:
- Tables, number 27 and 5401.
- XML Nodes named Item and ItemVariant.
- For both XML Repository lines, choose the Create Field Structure action to select the related Repository. Therefore, all related XML Fields are generated for the Fields and the Field Structure checkbox is selected.
- Create the four required Mapping Lines:
- For each Table line, enter Line Action = Find.
- For each XML Node line, enter Line Action = Insert else Modify All
- Use the Increase function in the Lines FastTab to indent each Mapping Line. This structure means that for each Item, all following Lines are processed and for each Item Variant the last Line is processed.
- In the Transfer Fields Repository Code field for both XML lines, select the related Repository Code of the Table.
- For the XML Node Item line (second line), choose Filters on the Lines FastTab. In the Filter page, choose the Filter Primary Keys (Transfer Fields) action on the Actions menu.
- Repeat step 5 for XML Node ItemVariant (fourth line).
- For the Table Item Variant line (third line), choose Filters on the Lines FastTab. Manually enter a line to filter only the relevant variants for the Item, i.e., the Item No. field (2) should be equal to the No. field (1) of the Item.
- In the Mapping Version Card, choose the Process action to save the complete list of Items to one XML file, including all fields. After each Item, the related Item Variant follows, if applicable.
If the Item Variant should be indented below the Item in the XML file, then enter the ITEM-XML repository in the Parent XML Node field on the Repository Card (see Repository - XML Node) for the Item Variant XML Node.
Feedback
Submit feedback for this page .