Hi,
I have source XML file, from that I need to put the same values in those elements in different elements in the targed XML file. Need to do this using XSL.
Source XML
Code:
<SearchRequest xmlns = "http://www.nyl_ltc.com/ltc_common">
<UserLoginName>SHANE</UserLoginName>
<TransactionGUID>Test ID</TransactionGUID>
<MaxRecords>20</MaxRecords>
<CriteriaExpression xmlns = "http://www.ttc.com/shared_transaction">
<Criteria>
<PropertyName>LastName</PropertyName>
<PropertyValue>SCOTT</PropertyValue>
<Operation>EQUALS</Operation>
</Criteria>
</CriteriaExpression>
</SearchRequest>
Target XML
Code:
<TTC xmlns="http://ttc/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.18.02">
<UserAuthRequest>
<UserLoginName>SHANE</UserLoginName>
</UserAuthRequest>
<TTCRequest>
<TransRefGUID>Test ID</TransRefGUID>
<TransType tc="301"/>
<TransExeDate>2012-04-26</TransExeDate>
<TransExeTime>10:28:15</TransExeTime>
<InquiryLevel tc="3">3</InquiryLevel>
<MaxRecords>20</MaxRecords>
<CriteriaExpression>
<Criteria>
<ObjectType tc="252">OLI_OLIFEEXTENSION</ObjectType>
<PropertyName>ProducerIdentifier</PropertyName>
<PropertyValue>939168</PropertyValue>
<Operation tc="1"/>
</Criteria>
</CriteriaExpression>
</TTCRequest>
</TTC>
Above you can see my source and target XML are different, How can transform above source XML file using XSL to required target XML.