1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml" >
4 <title>Namespace Resolver Test Case
</title>
7 <div id=
"result">FAILURE
</div>
8 <script type=
"text/javascript"><![CDATA
[
10 testRunner
.dumpAsText();
12 function MyNSResolver() {}
14 var sXml
= "<root xmlns='http://www.example.com'><child>SUCCESS</child></root>";
15 var oXmlDom
= (new DOMParser()).parseFromString(sXml
, "text/xml");
19 var oResult
= oXmlDom
.evaluate("foo:child/text()", oXmlDom
.documentElement
, new MyNSResolver
,
20 XPathResult
.ORDERED_NODE_ITERATOR_TYPE
, null);
23 document
.getElementById("result").textContent
= "SUCCESS";