Select Single Node with a attribute name in vbscript

倾然丶 夕夏残阳落幕 提交于 2019-12-05 16:02:50

To get any node, you can use this

Set queryNode = xmlDocument.selectSingleNode(".//node()[@context = 'General']")

or, specifically for the add node

Set queryNode = xmlDocument.selectSingleNode(".//add[@context = 'General']")

This is using XPath, which may require you to set the selection namespace property of the DomDocument

xmlDocument.setProperty "SelectionLanguage", "XPath"

You might want to search for a XPath tutorial, such as w3schools - New Link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!