How Do I Map from Specific Instances? (Magic xpi 4.13)
To map a multi-occurrence compound to a single-occurrence element, use the replication functionality to multiply Source compounds. Then map the Source data to the Destination 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 an XML Destination type, based on the given Destination schema.
-
In the Data Mapper screen, carry out the following:
-
Enable Instance Creation by selecting Yes from the Replication parameter's drop-down list in the Source compound’s Properties pane.
-
Verify that the compound name was changed to Addresses#1 in the Data Mapper screen.
-
From the compound node’s context menu, select Add Replication to create the required number of instances.
-
Connect the duplicated Source elements to the simple Destination element. For example:
| The replication in the Source will give you the first and second compound. There is no filtering available which allows you to select the required compound for each replication instance. |