Your expression of the path is beautiful, but perhaps it should be
substring(./td[3]/a[1]/@href,14)
“It doesn't seem to work” is a not-so-clear description of what is wrong. Are you getting error messages? Is the output wrong? Do you have code surrounding a path expression that you could show?
You can use a substring, but using substring-after() will be even better.
substring-after(/a/@href,'=')
Assuming you are injecting a tiny fragment that you showed:
<a href="page.php?var=12345"/>
will choose
12345
and given the structure of your input
substring-after(./td[3]/a[1]/@href,'=')
Lead . in the path expression selects only the immediate child nodes td current context node. I hope you know what you are doing.
source share