xmlxpathtinyxpath

How to select all elements with a specific attribute? with TinyXPath


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

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

Solution

  • This XPath selects all elements that have an A attribute:

    //*[@A]