How Do I Map to Specific Instances? (Magic xpi 4.13)
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:
![](/PublicKnowledge/servlet/rtaImage?eid=ka23z000000H0GE&feoid=00ND0000005rAjf&refid=0EM3z000007lCeT)
Sample Schema for Output XML Document:
![](/PublicKnowledge/servlet/rtaImage?eid=ka23z000000H0GE&feoid=00ND0000005rAjf&refid=0EM3z000007lCeW)
Sample XML Document:
![](/PublicKnowledge/servlet/rtaImage?eid=ka23z000000H0GE&feoid=00ND0000005rAjf&refid=0EM3z000007lCeX)
-
Drag a Data Mapper utility to the flow area.
-
From the Toolbox's Mapper Schemas section, drag an XML type into the Source area of the Data Mapper window.
-
In the XML Source's Properties pane, select the sample XML document.
-
From the Toolbox's Mapper Schemas section, drag a schema type which supports multi-occurrence compounds (for example, XML) into the Destination area of the Data Mapper window.
-
In the Destination's Properties pane, select the sample XML document.
-
In the Data Mapper screen, define the mappings shown below.
![](/PublicKnowledge/servlet/rtaImage?eid=ka23z000000H0GE&feoid=00ND0000005rAjf&refid=0EM3z000007lCeV)
-
In the Destination compound’s Properties pane, enable Instance Creation by selecting Yes in the Replication parameter's drop-down list.
-
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.