SaneQ
SaneQ

Reputation: 27

XPath: how to get a part of value

XML:

<strong class="pull-right ng-binding">Found: 1258</strong>

Need to get only value: "1258" without word "Found", cuz it's multilanguge project, and i cant use locales.

Now I stopped on this code:

"//strong[contains(text(),': "+value+"')]"

But contains works not correctly with asserts, and I need something with normalize-space

Upvotes: 0

Views: 58

Answers (1)

alecxe
alecxe

Reputation: 474161

Sounds like a job for substring-after():

substring-after(//strong, ": ")

Upvotes: 1

Related Questions