XSLT : I need to parse the xml with same element name with sequence of order to map in to another xml with different name

Posted by Karuna on Stack Overflow See other posts from Stack Overflow or by Karuna
Published on 2012-08-29T22:25:19Z Indexed on 2012/08/30 3:38 UTC
Read the original article Hit count: 126

Filed under:
|
|
|
|

As the below source XML Value/string element value has to be replace with target element value, Could some please help me out how to create the XSL to transform from source xml into target xml .Please. Source XML:

<PricingResultsV6>     
 <subItems>
 <SubItem>   
<profiles>
<ProfileValues>
<values> 
 <strings>800210</strings> 
 <strings>THC</strings> 
 <strings>10.0</strings> 
 <strings>20.0</strings> 
 <strings>30.0</strings> 
 <strings>40.0</strings> 
 <strings>550.0</strings> 
 <strings>640.0</strings> 
 </values>
</ProfileValues>
</rofiles>
</SubItem>
</subItems>
</PricingResultsV6>

Target XML :

<CalculationOutput>
            <PolicyNumber> 800210 </PolicyNumber>
            <CommissionFactorMultiplier> THC </CommissionFactorMultiplier>
            <PremiumValue>10.0</PremiumValue>
            <SalesmanCommissionValue>20.0</SalesmanCommissionValue>
            <ManagerCommissionValue>30.0</ManagerCommissionValue>
            <GL_COR> 550.0</GL_COR>
            <GL_OPO>640.0</GL_OPO>

</CalculationOutput>

© Stack Overflow or respective owner

Related posts about parsing

Related posts about xslt