michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208 michael@0: */ michael@0: michael@0: #include "domstubs.idl" michael@0: michael@0: interface XPathException; michael@0: michael@0: [scriptable, uuid(75506f84-b504-11d5-a7f2-ca108ab8b6fc)] michael@0: interface nsIDOMXPathResult : nsISupports michael@0: { michael@0: // XPathResultType michael@0: const unsigned short ANY_TYPE = 0; michael@0: const unsigned short NUMBER_TYPE = 1; michael@0: const unsigned short STRING_TYPE = 2; michael@0: const unsigned short BOOLEAN_TYPE = 3; michael@0: const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4; michael@0: const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5; michael@0: const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6; michael@0: const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7; michael@0: const unsigned short ANY_UNORDERED_NODE_TYPE = 8; michael@0: const unsigned short FIRST_ORDERED_NODE_TYPE = 9; michael@0: michael@0: readonly attribute unsigned short resultType; michael@0: readonly attribute double numberValue; michael@0: // raises(XPathException) on retrieval michael@0: michael@0: readonly attribute DOMString stringValue; michael@0: // raises(XPathException) on retrieval michael@0: michael@0: readonly attribute boolean booleanValue; michael@0: // raises(XPathException) on retrieval michael@0: michael@0: readonly attribute nsIDOMNode singleNodeValue; michael@0: // raises(XPathException) on retrieval michael@0: michael@0: readonly attribute boolean invalidIteratorState; michael@0: readonly attribute unsigned long snapshotLength; michael@0: // raises(XPathException) on retrieval michael@0: michael@0: nsIDOMNode iterateNext() michael@0: raises(XPathException, michael@0: DOMException); michael@0: nsIDOMNode snapshotItem(in unsigned long index) michael@0: raises(XPathException); michael@0: };