Hello,
Here is my xml file say trial.xml
<?xml version="1.0"?>
<Accounting name="vidya" age="25">
<Segment id="100">
Test</Segment>
<Segment type="GL/Account" id="120" description="Account">Test1</Segment>
<Segment type="Distribution" id="220" description="Distribute"/>
</Accounting>
Now I need to fetch the "id" value when type="Distribution"
So I tried writing the code in my xsl stylesheet as
<xsl:value-of select="Accounting/Segment/@type[@id='220'] "/>
But this is not giving me any results.. Any idea where exactly I am going wrong. If I try the same method for returning element value, it works but not working for attribute value.. Please help!!!