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.
<a> <b /> <c /> </a> <a1> <b /> </a1>
如何选择没有指定子节点的节点?例如,在我的示例a1中,我需要所有没有c节点的节点。
鉴于:
<root> <a> <b /> <c /> </a> <a1> <b /> </a1> </root>
采用:/root/*[not(c)]
/root/*[not(c)]
结果是a1。
a1