Hello friends, I have some very basic probelem of trying to retrieve the content of a Node which is of mixed type. i.e: My XML code is like this: <?xml version='1.0'?> <Institute> MCS Software <Franchisee>Dadar <Courses> <Course type="PT"> <Name>Java</Name> <Cost>20000</Cost> </Course> : : I am trying to retrieve the value of the <Institute> in my xsl as follows: <xsl:template match="/"> <html> <body bgcolor="orange"> <h1><xsl:value-of select="Institute"/></h1>
</body> </html> </xsl:template>
I am not able to retrieve only MCS SOftware,instead I get the values of ALL Child Nodes within the Institute tag. Th probelem is again repeated for the Franchisee tag also. Can someone suggest the right soln for such 'mixed' tags. Thanks in advance. Regards, Milan Doshi
Mapraputa Is
Leverager of our synergies
Sheriff
Joined: Aug 26, 2000
Posts: 10065
posted
0
You can use <xsl:value-of select="Institute/text()"/> - it will output only PCDATA without child elements.