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


I think the name of selectNode / selectSingleNode methods actually suggest that they are designed to return a node. , Although there is a setting available to enable XPath evaluator to return some other type of data or any other type of data (which are also valid XPath results)

 oDocument.selectSingleNode ("'1 ''); 

The error throws "The expression does not return a DOM node"

I oDocument.selectSingleNode ("concat (@day, '-', @mthth, '-', "Year") and get results (which is possible with the standard DOM XPath API). In fact, I can query for nodes and then cross them with DOM, although this is disabled.

select singlaode () and selectNodes () Selection of nodes identified by an XPath expression

Their return values ​​are of IXMLDOMNode and IXMLDOMNodeList , and nothing can return.

Those expressions Those who do not come back will make an error as a result of a node set (but otherwise valid XPath expression).


Comments