XPath for all elements with any attribute with specific value?
Here are XPath expressions for selecting...
All elements:
//*
All elements with an attribute,
a
://*[@a]
All elements with an attribute
a
equal tov
://*[@a='v']
All elements with any attribute:
//*[@*]
All elements with any attribute equal to
v
://*[@*='v']
Credit to Pierre for first posting //*[@*='v']
. Please upvote his answer.