Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何编写一个 XPath 表达式来选择那些没有文本子元素的元素?
您可以使用 :
//xmlelement[not(node())]
或者
//xmlelement[not(text())]