Generic XML Import Simple Example

The following is an example of an import document and template that uses most of the features present in a Generic XML template.

Input Document

Copy the following text to a new file and save as an XML file. Open Import Manager and select the file as the Data Source Filename and click 'Next.'

Copy
<Products>
   <Product>
      <Name>Pilot Pen</Name>
      <Market>
         <Priority>Low</Priority>
         <Attributes>
            <Attribute ID="42" UnitID="Pounds">3.068</Attribute>
            <Attribute ID="84" UnitID="Dollars">12.499</Attribute>
         </Attributes>
         <MarketID>USA</MarketID>
      </Market>
      <Market>
         <Priority>High</Priority>
         <Attributes>
            <Attribute ID="42" UnitID="Kg">1534</Attribute>
            <Attribute ID="84" UnitID="Euro">22.995</Attribute>
        </Attributes>
      <MarketID>EU</MarketID>
      </Market>
      <Colors>
         <Color>Red</Color>
         <Color>Green</Color>
         <Color>Blue</Color>
      </Colors>
    </Product>
    <Product>
        <Name>Parker Pen</Name>
        <Market>
            <Priority>Low</Priority>
        <Attributes>
                <Attribute ID="42" UnitID="Pounds">3.728</Attribute>
             <Attribute ID="84" UnitID="Dollars">24.199</Attribute>
        </Attributes>
        <MarketID>USA</MarketID>
       </Market>
       <Market>
            <Priority>Extreme</Priority>
            <Attributes>
               <Attribute ID="42" UnitID="Kg">1864</Attribute>
               <Attribute ID="84" UnitID="Euro">29.999</Attribute>
            </Attributes>
      <MarketID>EU</MarketID>
      </Market>
      <Colors>
         <Color>Gold</Color>
         <Color>Silver</Color>
      </Colors>
    </Product>
</Products>    

Template

Copy the following text and paste it in the Import Manager Select Format step, Sample field.

Copy
<Products>
    <Product>
    <?Record?>
      <Name><?Source?></Name>
      <Market>
        <?Repeated?>
        <Priority><?Source?></Priority>
        <Attributes>
          <Attribute ID="[?SourceID?]" UnitID="[?Source?]">
          <?Repeated?>
          <?Source Value?>
          </Attribute>
        </Attributes>
      <MarketID><?SourceID?></MarketID>
        </Market>
        <Colors>
          <Color><?MultiSource Colors?></Color>
        </Colors>
      </Product>
</Products>    

Conversion Preview

Click the Sample reload button . The Conversion Preview area displays the results of the input document against the provided template. The following Map Data step presents data in the same format that is used for and CSV / Excel import. Additionally, Generic XML data must be mapped and can be transformed. To learn more about inbound transformations, refer to the Inbound Map Data - Transform documentation here.