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相关的新手, 我无法理解:
SelectNodes(@"//Form/*[. = 'on']");
注意:SelectNodes是XmlNode的一个函数。(与XmlDocument相关)
请告诉我这段代码片段是什么意思?
.表示当前元素节点,不管它是什么。谓词检查元素的文本节点以查看它是否是字符串'on'。
.
'on'
这样 XPath 查询就会选择作为节点的子Form节点且值为 的任何节点on。
Form
on