Function getXPathStringFromDocument(document As DOMDocument, xpath As String, default As String) As String
Dim node As MSXML2.IXMLDOMNode
Set node = document.selectSingleNode(xpath)
If (node Is Nothing) Then
getXPathStringFromDocument = default
Exit Function
End If
getXPathStringFromDocument = node.Text
End Function