How to select all elements with a specific attribu

2019-03-22 18:48发布

问题:

What is the XPath expression for selecting all elements with attribute A?

const char* xpath = "//\*/\*[@A]"

回答1:

This XPath selects all elements that have an A attribute:

//*[@A]