You could use the Notes XML classes to load the XML and walk the tree looking for the node in question. Or you could instead use MS XMLDOM and XPath queries to get what you want e.g.
Dim xmlDoc As Variant
Dim xmlNode As Variant
Dim xmlParentNode As Variant
Dim bOK As Boolean
Dim sXPath As String
Set xmlDoc = CreateObject(“Msxml2.DOMDocument.3.0”)
Subject: Try removing the SelectionLanguages call…
i.e. Comment out the Call xmlDoc.setProperty(“SelectionLanguage”, “XPath”) line. This causes the MSXML 3.0 parser to use the older XSLPattern syntax engine. I tried that and it worked, although I can’t see why it should matter in the example you have given [but then, this is Microsoft technology, so we should expect things like this].
Hi again,when I’m trying to loop thur an array containing all applications, it doesn’t work:
Forall app In appArr
Print "'" + app + "'"
'sXPath = |.//vuln:product[. = "cpe:/a:adobe:acrobat_reader:9.3.3"]|
sXPath = |.//vuln:product[. = "} + cstr(app) + {"]|
Set xmlNode = xmlDoc.selectSingleNode(sXPath)
If xmlNode Is Nothing Then
Print "Not found"
Else
Set xmlParentNode = xmlNode.parentNode
Print xmlParentNode.nodeName
End If
Exit Sub
End Forall
The variable “app” contains “cpe:/a:adobe:acrobat_reader:9.3.3” the first time, but I’m just getting an “Not found” msgbox - why? When I’m using it as an hard coded string, it works :-?