aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/xpathresult/index.html
blob: 166f1ae6e440fa13e7412605b06319bc1170813d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
title: XPathResult
slug: Web/API/XPathResult
translation_of: Web/API/XPathResult
---
<p>{{APIRef}}</p>

<h2 id="Properties" name="Properties">Properties</h2>

<dl>
 <dt>{{domxref("XPathResult.booleanValue")}}</dt>
 <dd>readonly boolean</dd>
</dl>

<dl>
 <dt>{{domxref("XPathResult.invalidIteratorState")}}</dt>
 <dd>readonly boolean</dd>
</dl>

<dl>
 <dt>{{domxref("XPathResult.numberValue")}}</dt>
 <dd>readonly float</dd>
</dl>

<dl>
 <dt>{{domxref("XPathResult.resultType")}}</dt>
 <dd>readonly integer (short)</dd>
</dl>

<dl>
 <dt>{{domxref("XPathResult.singleNodeValue")}}</dt>
 <dd>readonly Node</dd>
</dl>

<dl>
 <dt>{{domxref("XPathResult.snapshotLength")}}</dt>
 <dd>readonly Integer</dd>
</dl>

<dl>
 <dt>{{domxref("XPathResult.stringValue")}}</dt>
 <dd>readonly String</dd>
</dl>

<h2 id="Methods" name="Methods">Methods</h2>

<dl>
 <dt>{{domxref("XPathResult.iterateNext()")}}</dt>
 <dd>...</dd>
 <dt>{{domxref("XPathResult.snapshotItem()")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Constants" name="Constants">Constants</h2>

<table class="standard-table">
 <thead>
  <tr>
   <td class="header">Result Type Defined Constant</td>
   <td class="header">Value</td>
   <td class="header">Description</td>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>ANY_TYPE</td>
   <td>0</td>
   <td>A result set containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type.</td>
  </tr>
  <tr>
   <td>NUMBER_TYPE</td>
   <td>1</td>
   <td>A result containing a single number. This is useful for example, in an XPath expression using the <code>count()</code> function.</td>
  </tr>
  <tr>
   <td>STRING_TYPE</td>
   <td>2</td>
   <td>A result containing a single string.</td>
  </tr>
  <tr>
   <td>BOOLEAN_TYPE</td>
   <td>3</td>
   <td>A result containing a single boolean value. This is useful for example, in an XPath expression using the <code>not()</code> function.</td>
  </tr>
  <tr>
   <td>UNORDERED_NODE_ITERATOR_TYPE</td>
   <td>4</td>
   <td>A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.</td>
  </tr>
  <tr>
   <td>ORDERED_NODE_ITERATOR_TYPE</td>
   <td>5</td>
   <td>A result node-set containing all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.</td>
  </tr>
  <tr>
   <td>UNORDERED_NODE_SNAPSHOT_TYPE</td>
   <td>6</td>
   <td>A result node-set containing snapshots of all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.</td>
  </tr>
  <tr>
   <td>ORDERED_NODE_SNAPSHOT_TYPE</td>
   <td>7</td>
   <td>A result node-set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.</td>
  </tr>
  <tr>
   <td>ANY_UNORDERED_NODE_TYPE</td>
   <td>8</td>
   <td>A result node-set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression.</td>
  </tr>
  <tr>
   <td>FIRST_ORDERED_NODE_TYPE</td>
   <td>9</td>
   <td>A result node-set containing the first node in the document that matches the expression.</td>
  </tr>
 </tbody>
</table>

<h3 id="See_also" name="See_also">See also</h3>

<ul>
 <li>{{domxref("Document.evaluate()")}}</li>
</ul>