Tuesday, 27 August 2013

Looping through nodes in XSLT

Looping through nodes in XSLT

Please help on XSLT, I have this XML sample
<?xml version="1.0" encoding="utf-8"?>
<Document>
<TopLevel>
<Header>
<!-- Header Information-->
</Header>
<!--Payments is a one to many-->
<Payments>
<PaymentID>PID1</PaymentID>
<!--More Info-->
<!--Transactrion can be one to many for each payment-->
<Transaction>
<TranssID>TR1 - PID1</TranssID>
<TranssID>TR2 - PID1</TranssID>
<!--More Info-->
</Transaction>
</Payments>
<Payments>
<PaymentID>PID2</PaymentID>
<!--More Info-->
<!--Transactrion can be one to many for each payment-->
<Transaction>
<TranssID>TR1 - PID2</TranssID>
<TranssID>TR2 - PID2</TranssID>
<!--More Info-->
</Transaction>
</Payments>
</TopLevel>
</Document>
I need a looping mechanism in XSLT that will give me the transactions for
each payments.

No comments:

Post a Comment