The expression you provided :
//Races/Race[/FirstRun[@ActStart>'2011-03-01' or ActEnd<'2011-03-15']]
will not select node , because in XPath 1.0 there are no comparison operators > or < for strings (only for numbers). The two lines above are first converted to numbers, which gives NaN , and any comparison with NaN is false() . Therefore, the predicate value is false() and the expression does not select node.
The fact that using MSXML2.DOMDocument.SelectNodes() selects nodes is that in this early version of MSXML, the default language of choice is not XPath , but something called "XSL" (if I remember well), and this is not a standard , language W3C XPath.
I assume that MSXML6 no longer provides this obsolete dialect.
In your case, you can successfully use this XPath expression :
//Races/Race[/FirstRun [translate(@ActStart,'-','') > 20110301 or translate(ActEnd, '-','') < 20110315 ] ]
source share