Sometimes
parsing XML is akin to the needle-in-a-haystack problem, especially with large,
complex documents. Fortunately, the DOM specification gives a simple way to
narrow a search in an attempt to select a single node. The method is available
from the DOMDocument class and is appropriately called selectSingleNode. Here
is a sample using VB and MSXML:
Set node = item.selectSingleNode("myNode")
If Not node is Nothing Then
'// code here
Else
'// error stuff here
End If