How Do I Map to Specific Instances? (Magic xpi 3.x)
To map single-occurrence compounds to a multi-occurrence compound, use Instance Creation to multiply Destination compounds. Then map the Source data to the appropriate created compound.
Sample Schema for Input XML Document:
Sample Schema for Output XML Document:
Sample XML Document:
-
Create a Data Mapper step.
-
Define an XML Source type, based on the given schema.
-
Define a Destination type, which supports multi-occurrence compounds (for example, XML), based on the given schema.
-
In the Data Mapper screen, define the mappings shown below.
-
Enable Instance Creation by checking the Replication check box in the Destination compound’s Node Properties screen.
-
Verify that the compound name was changed to Address#1 in the Data Mapper screen.
-
From the compound node’s context menu, select Add Replication to create the required number of replications. Connect the simple elements in the Source to each specific Destination instance.