且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 vbscript 检查 XML 中的特定节点是否存在

更新时间:2023-11-25 12:10:04

使用这个 XPath 你会得到所有 没有对应的 代码>:

Using this XPath you'll get all <PNAME> which doesn't have corresponding <PGROUGP> :

/ECSC/PARAMETERS/ETPAR_GUIX/item[not(PGROUP)]/PNAME

这样你就可以确定 NodeList 中的每个 item 必须没有 :

This way you're sure that each item in NodeList must be without <PGROUP> :

Set NodeList = objMSXML.documentElement.selectNodes("/ECSC/PARAMETERS/ETPAR_GUIX/item[not(PGROUP)]/PNAME")