cancel
Showing results for 
Search instead for 
Did you mean: 

Creating target nodes from parent and multiple child nodes

0 Kudos

Hello Experts,

I have an XML with parent and nested child nodes. For each child node I need to have a target node. How can I achieve this with message mapping or XSLT mapping. When I try using message mapping (below), I am getting only the first child.

Here is XML input (there are more fields in the XML but for simplicity I am only using few fields here):

<A_BusinessPartner>
<A_BusinessPartnerType>
<Supplier>VN112233</Supplier>
<to_Supplier>
<A_SupplierType>
<to_SupplierCompany>
<A_SupplierCompanyType>
<CompanyCode>1000</CompanyCode>
</A_SupplierCompanyType>
<A_SupplierCompanyType>
<CompanyCode>1010</CompanyCode>
</A_SupplierCompanyType>
</to_SupplierCompany>
</A_SupplierType>
</to_Supplier>
<BusinessPartner>VN112233</BusinessPartner>
</A_BusinessPartnerType>
</A_BusinessPartner>

The desired output is:

<A_VENDORDATA>
<A_VENDORDATAType>
<Supplier>VN112233</Supplier>
<CompanyCode>1000</CompanyCode>
</A_VENDORDATAType>
<A_VENDORDATAType>
<Supplier>VN112233</Supplier>
<CompanyCode>1010</CompanyCode>
</A_VENDORDATAType>
</A_VENDORDATA>

Any help is appreciated. Thanks!

Accepted Solutions (0)

Answers (0)