MultiSource Processing Instructions in Generic XML

To extract the value of a repeating XML element as a multi-value field that can be mapped to a multi-valued attribute / reference in STEP, place a <?MultiSource [OptionalIdentifier]?> instruction in either the node or the attribute of the <?Record?> scope:

Copy
<Products>
  <Product ID="[?Source?]">
    <?Record?>
    <KeyWords>
        <KeyWord><?MultiSource?></KeyWord>
    </KeyWords>
  </Product>
</Products>    

Within the same scope, multiple nodes / attributes matching a <?MultiSource [OptionalIdentifier]?> declaration will contribute to the same multi-value field. The input document below, uses the template above.

Copy
<Products>
  <Product ID="42">
    <KeyWords>
      <KeyWord>Red</KeyWord>
      <KeyWord>Green</KeyWord>
      <KeyWord>Blue</KeyWord>
    </KeyWords>
  </Product>
</Products>    

It produces the fields 'ID' and 'KeyWord' with values ID=42 and KeyWord=Red|Green|Blue. Note that container-node, 'KeyWords' in this case, is not a requirement to extract a multi-value field. A document with the 'KeyWord' nodes directly under the 'Product' node could be processed by using the following template:

Copy
<Products>
  <Product ID="[?Source?]">
    <?Record?>
    <KeyWord><?MultiSource KeyWords?></KeyWord>
  </Product>
</Products>    

Like the <?Source?> instruction, the <?MultiSource?> instruction also supports explicitly specifying a field name using an optional identifier. For more information, refer to the Preventing Duplicate Field Names section of the Source Processing Instructions in Generic XML documentation here.