xmlxslt-1.0map-force

Mapping using Mapforce


This is the structure snipped i get with my input file

<fields>
    <field>
        <name>CompanyID</name>
        <values>
            <value>12345</value>
        </values>
    </field>
    <field>
        <name>DivisionID</name>
        <values>
            <value>100</value>
        </values>
    </field>
</fields>

Am trying to map it to my company structure which we can use across for our reporting application

<EmployeeID /> ->This should map to CompanyID from my input file
<DivisionID /> -> This should map to DivisionID from my input file

However when I load up the 2 xml in Mapforce my input schema showsenter image description here

How do I map a collection from input file to a specific element in my output file.

The resulting XSLT would be used in a C# code


Solution

  • You have to use a Filter component. Here a mapping based on your input.

    The mapping

    You should have this output:

    output