I have the following node in a XML doc:
<node>This is some text.</node>
I want to select the first 10 characters of the text. How can I do this?
You can use the substring function to select the first 10 characters.
<xsl:value-of select="substring(node/text(),1,10)"/>
Hope this helps
Try this
substring(/node,1,10)
Reference for substring fn.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With