How do you run an xPath query in IE11?

前端 未结 2 809
说谎
说谎 2020-12-15 08:18

At one point in our system we use javascript to read in a chunk of XML and then query that XML document using xPath.

Prior to IE 11, IE supported using xmldoc.select

2条回答
  •  不知归路
    2020-12-15 08:42

    To expand on pixelmatt's answer, some results of my tests (Win 7 64bit with IE11) I did in order to get DOMParser to work as it did in IE9 and IE10 (in IE11 it now returns an XMLDocument object which appears to not support xpath queries?).

    Turns out I could make it behave like in IE10 with the following meta tag:

    
    

    Results without and with above meta: IE11 default mode IE11 in IE10 mode

    And here are the XMLDocument's memebers (for reference): enter image description here

提交回复
热议问题