Appendix C: ECMA Script
Language Binding
This appendix contains the complete ECMA Script [ECMAScript] binding
for the Level 3 Document Object Model XPath definitions.
- Prototype Object XPathExceptionCode
-
- The XPathExceptionCode class has the following
constants:
-
- XPathExceptionCode.TYPE_ERR
- This constant is of type Number and its value is
1.
- Object XPathExceptionCode
- Object XPathException
-
- The XPathException object has the following
properties:
-
- code
- This property is of type Number.
- Object XPathEvaluator
-
- The XPathEvaluator object has the following
methods:
-
- evaluateAsBoolean(expression, contextNode,
resolver)
- This method returns a Boolean.
The expression parameter is of type String.
The contextNode parameter is a Node object.
The resolver parameter is a NamespaceResolver
object.
This method can raise a XPathException object.
- evaluateAsNumber(expression, contextNode, resolver)
- This method returns a double object.
The expression parameter is of type String.
The contextNode parameter is a Node object.
The resolver parameter is a NamespaceResolver
object.
This method can raise a XPathException object.
- evaluateAsString(expression, contextNode, resolver)
- This method returns a String.
The expression parameter is of type String.
The contextNode parameter is a Node object.
The resolver parameter is a NamespaceResolver
object.
This method can raise a XPathException object.
- evaluateAsNode(expression, contextNode, resolver)
- This method returns a Node object.
The expression parameter is of type String.
The contextNode parameter is a Node object.
The resolver parameter is a NamespaceResolver
object.
This method can raise a XPathException object.
- evaluateAsNodeSet(expression, contextNode,
resolver)
- This method returns a ActiveNodeSet object.
The expression parameter is of type String.
The contextNode parameter is a Node object.
The resolver parameter is a NamespaceResolver
object.
This method can raise a XPathException object.
- Object StaticNodeSet
-
- The StaticNodeSet object has the following
properties:
-
- length
- This read-only property is of type Number.
- The StaticNodeSet object has the following methods:
-
- item(index)
- This method returns a Node object.
The index parameter is of type Number.
Note: This object can also be dereferenced using square
bracket notation (e.g. obj[1]). Dereferencing with an integer
index is equivalent to invoking the item method with
that index.
- Object ActiveNodeSet
-
- The ActiveNodeSet object has the following methods:
-
- nextNode()
- This method returns a Node object.
This method can raise a DOMException object.
- reset()
- This method has no return value.
This method can raise a DOMException object.
- cloneSet()
- This method returns a ActiveNodeSet object.
This method can raise a DOMException object.
- getDocumentOrderedSet()
- This method returns a ActiveNodeSet object.
This method can raise a DOMException object.
- getStaticNodeSet()
- This method returns a StaticNodeSet object.
This method can raise a DOMException object.
- Object NamespaceResolver
-
- The NamespaceResolver object has the following
methods:
-
- lookupNamespaceURI(prefix)
- This method returns a String.
The prefix parameter is of type String.