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.
我是 XML 和 xPath 的新手。我有一个类似于的 XML 结构
<root> <child name="zero"/> <child name="one"/> <child name="two"/> <child name="three"/> </root>
有没有办法使用 xPath 表达式只选择 name != "zero" 的孩子?
当然。只需在方括号中指定条件:
/root/child[not(@name="zero")]