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

心已入冬 提交于 2019-12-03 14:17:31

问题


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]


来源:https://stackoverflow.com/questions/5617692/how-to-select-all-elements-with-a-specific-attribute-with-tinyxpath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!