Reputation: 12885
if
/dt/@id
returns comment_34232
or comment_12
how can I make it return 34232
or 12
(in other words replaceing 'comment_'
with ''
and if
/span/style
returns width: 80%;
how can I replace width:
and after that %;
to retrieve 80
Regards
Upvotes: 4
Views: 1968
Reputation: 243599
I. Part
if
/dt/@id returns `comment_34232` or `comment_12` how can I make it return
34232
or12
(in other words replaceing'comment_'
with''
Use:
substring-after(/dt/@id, '_')
II. Part
and if
/span/style returns `width: 80%;` how can I replace `width: ` and after
that
%;
to retrieve80
Use:
substring-before(substring-after(/span/style, ' '), '%')
Do note: the use of the standard XPath functions substring-before()
and substring-after()
.
Upvotes: 5