html - css or xpath selector: elements which have any attribute with specific value -
i want match elements in html dom tree have attribute value "foo". should either css or xpath selector.
my naive approach css selector:
*[*='foo'] how correct syntax?
css not define attribute selector takes wildcard name.
xpath, however, does. following expression should work:
//*[@*="foo"]
Comments
Post a Comment