Error when using axis with xpath query in IE
When using XPath expression "descendant::div" with selectNodes in IE i am getting an error "Expected t开发者_StackOverflow中文版oken 'eof' found ':'". Is there something i am missing here, please help me get around this issue.
Best Regards, Keshav
When getting this error it means that the MSXML version in use is older than version 4.0 and thus default to the older value of XSLPattern that does not handle the XPath axis, e.g. 'descendant::' Keshav´s solution should work in this case.
I have found the solution somewhere on the web. To use complete xpath below property has to be set on the document object.
document.setProperty("SelectionLanguage", "XPath");
精彩评论