Selected tag name code example
Example 1: attribute name selection
document.evaluate(
'//*[@*[starts-with(name(), "data-custom-")]]',
document,
null,
XPathResult.UNORDERED_NODE_ITERATOR_TYPE,
null
)
Example 2: attribute name selection
document.evaluate(
'//*[starts-with(name(), "custom-")]',
document,
null,
XPathResult.UNORDERED_NODE_ITERATOR_TYPE,
null
)