1/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
7 */
8
9interface XPathResult {
10  // XPathResultType
11  const unsigned short ANY_TYPE = 0;
12  const unsigned short NUMBER_TYPE = 1;
13  const unsigned short STRING_TYPE = 2;
14  const unsigned short BOOLEAN_TYPE = 3;
15  const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
16  const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
17  const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
18  const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
19  const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
20  const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
21
22  readonly attribute unsigned short resultType;
23  [Throws]
24  readonly attribute double numberValue;
25  [Throws]
26  readonly attribute DOMString stringValue;
27  [Throws]
28  readonly attribute boolean booleanValue;
29  [Throws]
30  readonly attribute Node? singleNodeValue;
31  readonly attribute boolean invalidIteratorState;
32  [Throws]
33  readonly attribute unsigned long snapshotLength;
34  [Throws]
35  Node? iterateNext();
36  [Throws]
37  Node? snapshotItem(unsigned long index);
38};
39