TFHpple XPath query with function on iOS

82 Views Asked by At

I want to parse html to get tag attribute, but I want to change the value of that attribute using substring function. I'm using libxml2.2.tdb framework with TFHpple addon

HTML to parse:

<div>
  <img src="00-abc.jpg">
</div>

What I want to get:

abc.jpg

What I tried (and it didn't work):

substring(//div/img/@src, 3)
replace(//div/img/@src, "00-")
//div/img/@src[substring(., 3)]
0

There are 0 best solutions below