Hi,
Its bit urgent!
Can someone please show me how to use nested loop.
I have following XML file. I need to print amount in minus if any of the ApplicationReply value is credit, else the Amount should be positive.
<xsl:for-each select="Reply/ApplicationReplies/ApplicationReply[@Name='credit']">
<xsl:if test="position() = 1">
<xsl:value-of select="concat($sep, $sign, /Reply/Amount,$sep)"/>
</xsl:if>
</xsl:for-each>
It prints -Amount if Name is credit.
How do i get else? if its not credit?
<Reply>
<ApplicationReplies>
<ApplicationReply Name="auth">
<RCode>1</RCode>
<RFlag>SOK</RFlag>
<RMsg>successfully.</RMsg>
</ApplicationReply>
<ApplicationReply Name="bill">
<RCode>1</RCode>
<RFlag>SOK</RFlag>
<RMsg>successfully.</RMsg>
</ApplicationReply>
<ApplicationReply Name="credit">
<RCode>1</RCode>
<RFlag>SOK</RFlag>
<RMsg>successfully.</RMsg>
</ApplicationReply>
</ApplicationReplies>
<amount> 100 <amount>
</Reply>