Excuse me if this seems too simple. I am new to BizTalk.
Lets say I have source XML document.
<Fruit>
<FruitCode>APP</FruitCode>
<FruitDescription>Apple</FruitDescription>
</Fruit>
<Fruit>
<FruitCode>ORG</FruitCode>
<FruitDescription>Orange</FruitDescription>
</Fruit>
The source schema would be
<xs:element minOccurs=”0″ maxOccurs=”unbounded” name=”Fruit”>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs=”0″ name=”FruitCode” type=”xs:string” />
<xs:element minOccurs=”0″ name=”FruitDescription” type=”xs:string” />
</xs:sequence>
</xs:complexType>
</xs:element>
The destination schema looks like the following:
<xs:element minOccurs=”0″ maxOccurs=”1″ name=”FruitA” type=”xs:string” />
<xs:element minOccurs=”0″ maxOccurs=”1″ name=”FruitB” type=”xs:string” />
In the mapper, I was thinking about using an Equal functiod to return true if the FruitCode is APP. Then use a Value Mapp functiod to return 1 for FruitA. I would do the same where FruitCode is ORG, but send it to FruitB. It doesn’t seem to be working. Am I going in the right direction?