<?xml version="1.0" encoding="UTF-8"?>
<a>
<b>6.89<c>45</c></b>
</a>
I tried //b getting wrong result http://xpather.com/LwG6si6t
Desired Output to get 6.89 only.
Thanks!
>Solution :
You want //b/text() for that sample or //b/text()[1] if there can be more text after the c element.