To get any node, you can use this
Set queryNode = xmlDocument.selectSingleNode(".//node()[@context = 'General']")
or in particular for add node
Set queryNode = xmlDocument.selectSingleNode(".//add[@context = 'General']")
This uses XPath, which may require setting the namespace property to select in DomDocument
xmlDocument.setProperty "SelectionLanguage", "XPath"
You might want to find an XPath tutorial like w3schools - New link
user69820
source share