Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi All,

I have an xml file like this

<data>
    <name>Ram</name>
    <id>66758</id>
</data>


How do i check in xslt file if the id starts with 66?Please help.

Thanks.
Posted
Updated 1-Apr-13 3:34am
v3

1 solution

XML
<xsl:template match="data">
    <xsl:if test="starts-with(id, '6')">


Documentation: starts-with Function
 
Share this answer
 
Comments
vidkaat 1-Apr-13 10:22am    
When i try to write this inside <p> it throws an error. Any suggestion?Thanks.
José Amílcar Casimiro 2-Apr-13 5:40am    
Can you give me an source code example?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900