I am trying extract 2nd class name from <span>
tag.
Due xidel documentation is really poor. I can't understand how to
use function filter()
or contains()
and match <span>
tag with
class name "userstatus" and extract 2nd class name.
I have this at the moment but I can't tell to XIDEL tool match span tag with class when one parameter contain word userstatus.
xidel -e http://intranet.website.com '//li[@class='status']/span[@class==match("userstatus").....
Thank you for any suggestions
<li class="status">
<span class="userstatus offline strongfont2">
blaa bllaa foo text
</span>
</li>
<li class="status">
<span class="userstatus online italicfont1">
blaa bllaa foo text
</span>
</li>`
I need extract class parameters of <span>
tag.
I don't need text or HTML content of <span>
tag.
Result look like this:
class="userstatus offline strongfont2"
class="userstatus online italicfont1"