Use selectNodes with multiple alternative paths OR combine 2-3 IXMLDOMNODELIST
-
19-09-2019 - |
Question
Just wondering if anyone would be able to help with the following VBScript script I'm writing:
Can I do somthing similar to this:
Set obj = something.selectNodes(path1, path2, path3) // Where it will match either of the paths?
Or, if not, is there a way I can combine what selectNodes returns (IXMLDOMNodeList)? e.g.
Set obj1 = something.selectNodes(path1) Set obj2 = something.selectNodes(path2)
Set obj3 = obj1 + obj2
Many thanks in advance
Solution
Found it was actually XPATH sytax I needed to learn about, specifically using XPATH like an SQL SELECT statement, e.g.
Set obj = something.selectNodes([(path1 and path2) or path3])
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow