Reputation: 659
Here is html:
<span id="priceblock_ourprice" class="a-size-medium a-color-price"><span class="currencyINR"> </span> 69,000.00</span>
I want to get that 69,000.00
at the end I tried
.replace("<span class=\"currencyINR\"> </span>","")
But it didn't work
Upvotes: 0
Views: 47
Reputation: 6151
For the above html you can use the text
method:
String html = "<span id=\"priceblock_ourprice\" class=\"a-size-medium a-color-price\">"+
"<span class=\"currencyINR\"> </span> 69,000.00</span>";
Document doc = Jsoup.parse(html);
String output;
output = doc.text();
System.out.println(output);
And the result:
69,000.00
Upvotes: 1