Q:

Is there a way to get a non-node result from MSXML XPath evaluator?

I understand that the name of selectNode/selectSingleNode methods actually suggests that they are designed to return a node, however maybe there is some other way or a setting available to enable XPath evaluator to return data of other types (that are also valid XPath results)

oDocument.selectSingleNode("'1'"); 

throws an error "Expression does not return a DOM node"
I want to query oDocument.selectSingleNode("concat(@day, '-', @month, '-', @year") and get a result (that is possible with standard DOM XPath API). Indeed I can query for nodes and then traverse them with DOM, however this would be way to inefficient.

A:

selectSingleNode() and selectNodes() select nodes identified by an XPath expression.
Their return values are of type IXMLDOMNode and IXMLDOMNodeList, respectively. Nothing else can be returned.
Expressions that do not return a node set (but otherwise are valid XPath expressions) will result in an error.

