Ron Bledsoe
Ron Bledsoe

Reputation: 151

I have this HTML and need help writing an XpathQueryString

I am trying to write an XPath to pull the value 4.4690 from the tag below. Any help will be appreciated.

<div id=currency_converter_result>10 BRL = <span class=bld>4.4690 USD</span>
   <input type=submit value="Convert">
</div>

Upvotes: 1

Views: 82

Answers (1)

alecxe
alecxe

Reputation: 474161

Find the span's text and use substring-before() to extract the part of a text before the USD:

substring-before(//div[@id="currency_converter_result"]/span[@class="bld"], " USD")

Upvotes: 4

Related Questions