Reviewed by Darin.
[WebKit-https.git] / LayoutTests / fast / xpath / 4XPath / Borrowed / sr_20021217.html
1 <!-- http://lists.fourthought.com/pipermail/4suite/2002-December/004771.html -->
2 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
3 <html>
4 <head>
5 <link rel="stylesheet" href="../../../js/resources/js-test-style.css">
6 <script src="../../../js/resources/js-test-pre.js"></script>
7 </head>
8 <body>
9 <div id="console"></div>
10
11 <script>
12     DOC1 = '<a><b><c/><d/></b></a>'
13
14     doc = (new DOMParser).parseFromString(DOC1, "application/xml");
15     nodeset = doc.evaluate('.//*', doc.documentElement, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
16     node_names = "";
17     while (currNode = nodeset.iterateNext())
18         node_names += currNode.nodeName;
19     shouldBe('node_names', '"bcd"')
20
21     nodeset = doc.evaluate('(.//*)[1]', doc.documentElement, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
22     node_names = "";
23     while (currNode = nodeset.iterateNext())
24         node_names += currNode.nodeName;
25     shouldBe('node_names', '"b"')
26
27     var successfullyParsed = true;
28
29 </script>
30 <script src="../../../js/resources/js-test-post.js"></script>
31 </body>
32 </html>