XSLT replace attributes
I have the following xml
<ExternalAssessmentRequest>
<ApplicationData Lender="Test">
<LiabilityList>
<RequestedLoan Identifier="New1" BaseAmount="250000"
LoanAccountFees="100" LoanAccountLMI="2000" LoanTerm="25"
LoanTermMonths="6" Product="Basic Variable" Repurposing="No"
PrimaryPurpose="OwnerOccupied" TaxDeductible="No"
InterestRate="0.075" ProductID="Product1"
PaymentType="InterestOnly" ABSCode="123">
<Applicant RelatedIdentifier="Applicant1" Percentage="0.5"/>
<Applicant RelatedIdentifier="Applicant2" Percentage="0.5"/>
<Feature Code="SupaPackage"/>
</RequestedLoan>
</LiabilityList>
</ApplicationData>
<AdditionalAssessment Lender="MegaBank">
<RequestedLoan Product="Supa Variable" ProductID="Product2"/>
</AdditionalAssessment>
</ExternalAssessmentRequest>
I need to use Xpath to create two seperate elements. One is the existing
and the other one is again the existing BUT only the elements and
attributes specified in must be replaced.
So the end result should be
<ExternalAssessmentRequest>
<ApplicationData Lender="Test">
<LiabilityList>
<RequestedLoan Identifier="New1" BaseAmount="250000"
LoanAccountFees="100" LoanAccountLMI="2000" LoanTerm="25"
LoanTermMonths="6" Product="Basic Variable" Repurposing="No"
PrimaryPurpose="OwnerOccupied" TaxDeductible="No"
InterestRate="0.075" ProductID="Product1"
PaymentType="InterestOnly" ABSCode="123">
<Applicant RelatedIdentifier="Applicant1" Percentage="0.5"/>
<Applicant RelatedIdentifier="Applicant2" Percentage="0.5"/>
<Feature Code="SupaPackage"/>
</RequestedLoan>
</LiabilityList>
</ApplicationData>
<ApplicationData Lender="MegaBank">
<LiabilityList>
<RequestedLoan Identifier="New1" BaseAmount="250000"
LoanAccountFees="100" LoanAccountLMI="2000" LoanTerm="25"
LoanTermMonths="6" Product="Supa Variable" Repurposing="No"
PrimaryPurpose="OwnerOccupied" TaxDeductible="No"
InterestRate="0.075" ProductID="Product2"
PaymentType="InterestOnly" ABSCode="123">
<Applicant RelatedIdentifier="Applicant1" Percentage="0.5"/>
<Applicant RelatedIdentifier="Applicant2" Percentage="0.5"/>
<Feature Code="SupaPackage"/>
</RequestedLoan>
</LiabilityList>
</ApplicationData>
</ExternalAssessmentRequest>
Pleaseeee help me.
No comments:
Post a Comment