1 <html> 2 <head> 3 <link rel="stylesheet" href="../js/resources/js-test-style.css"> 4 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="xpath-test-pre.js"></script> 6 </head> 7 <body> 8 <p>This tests that XPath expressions with prefixes work correctly.</p> 9 <div id="console"></div> 10 <script> 11 var xmlString = '<div/>'; 12 var doc = (new DOMParser()).parseFromString(xmlString, "text/xml"); 13 document.body.insertBefore(document.importNode(doc.documentElement, null), document.body.firstChild); 14 15 var expr = document.createExpression("//div", null); 16 var result = expr.evaluate(document.documentElement, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); 17 checkSnapshot("//div", result, [document.getElementById("console")]); 18 19 var successfullyParsed = true; 20 21 </script> 22 <script src="../js/resources/js-test-post.js"></script> 23 </body> 24 </html> 25