PART A
I'd like to select an HTML element by its attribute values. I'd like to be able to match all the attributes.
So an element <a>
with the following attributes for example:
'href' => "https://twitter.com/JSTOR"
'target' => "_blank"
'class' => "icon-twitter twitter-styling icon-large"
'aria-label' => "Twitter - This link opens in a new window"
Is it like this: //a[@href='https://twitter.com/JSTOR' AND @target='_blank' AND @class='icon-twitter twitter-styling icon-large' ...
So if I have n attributes, I need n-1 "AND"?
PART B
Also worth noting is the multiple values in "class". Can I simply have @class='classA classB classC' or should I @class='classA' AND @class='classB' AND @class='classC'?
PART C
Lastly, for the multiple values in "class", does the order matter? If the tag lists 'classA classB' and we use an xpath //a[@class='classB classA', will it still match?
**Please note I need an answer for XPath 1.0