im trying to take substring of a element with xpath,
<table>
<tr><td>color : blue</td></tr>
<tr><td>color - green</td></tr>
<tr><td>jasmine flower</td></tr>
</table>
td tag contains the color values blue and green seperated by a hyphen or a colon
i have xpath for substring-after colon //tr/td/substring-after(text(),':')
which gives me output blue and for substring-after hypen //tr/td/substring-after(text(),'-')
which gives me output green
but i want to merge both xpath codes into one single code
i tried the following code
//tr/td/[substring-after(text(),':') or substring-after(text(),'-')]
which gives me output like this
[true]
[true]
[false]
and //tr/td/text()[substring-after(.,':') or substring-after(.,'-')]
which gives output like
color : blue
color - green
what I need is
blue
green
need a single line code
note : im testing my code in http://videlibri.sourceforge.net/cgi-bin/xidelcgi