Procedure
-
Double-click the tXMLMap component to open its Map Editor.
Note that the input area is already filled with the defined input tables and the top table is the main input table.
-
In the
row2
input table, right-click theUSState
node and from the contextual menu select Import From File. In the pop-up dialog box, browse to the XML source file to import therefrom the XML tree structure used by the data to be received by tXMLMap. In this scenario, the XML source file is USState.xml, which is the input data to tFileInputXML labelled USStates. -
In the imported XML tree, right-click the
States
node and from the contextual menu select As loop element to set it as the loop element. -
In the
row1
main input table, click theidState
node and drop it to the Exp.key column in the row of theidState
node in therow2
lookup input table. This creates a join between the two input tables on theidState
data, among which theidState
node from the main flow provides the lookup key. -
In the
row2
lookup input table, click theLabelState
node and drop it on thecustomer
node in theCustomer
output table. A dialog box pops up. -
In the pop-up dialog box, select Create as sub-element
of target node and click OK. A
new
LabelState
sub-element is added to the output XML tree and mapped with theLabelState
node in the lookup input table. - Click OK to validate the mappings and close the Map Editor.