DOMXPathResult
interface represents the result of the evaluation of an XPath 1.0 or XPath 2.0 expression within the context of a particular node.
More...
#include <DOMXPathResult.hpp>
Public Types | |
Public Contants | |
enum | ResultType { ANY_TYPE = 0, NUMBER_TYPE = 1, STRING_TYPE = 2, BOOLEAN_TYPE = 3, UNORDERED_NODE_ITERATOR_TYPE = 4, ORDERED_NODE_ITERATOR_TYPE = 5, UNORDERED_NODE_SNAPSHOT_TYPE = 6, ORDERED_NODE_SNAPSHOT_TYPE = 7, ANY_UNORDERED_NODE_TYPE = 8, FIRST_ORDERED_NODE_TYPE = 9, FIRST_RESULT_TYPE = 100, ITERATOR_RESULT_TYPE = 101, SNAPSHOT_RESULT_TYPE = 102 } |
Public Member Functions | |
Destructor | |
virtual | ~DOMXPathResult () |
Destructor. | |
Functions introduced in DOM Level 3 | |
virtual ResultType | getResultType () const =0 |
Returns the result type of this result. | |
virtual const DOMTypeInfo * | getTypeInfo () const =0 |
Returns the DOM type info of the current result node or value (XPath 2 only). | |
virtual bool | isNode () const =0 |
Returns true if the result has a current result and the value is a node (XPath 2 only). | |
virtual bool | getBooleanValue () const =0 |
Returns the boolean value of this result. | |
virtual int | getIntegerValue () const =0 |
Returns the integer value of this result (XPath 2 only). | |
virtual double | getNumberValue () const =0 |
Returns the number value of this result. | |
virtual const XMLCh * | getStringValue () const =0 |
Returns the string value of this result. | |
virtual DOMNode * | getNodeValue () const =0 |
Returns the node value of this result. | |
virtual bool | iterateNext ()=0 |
Iterates and returns true if the current result is the next item from the sequence or false if there are no more items. | |
virtual bool | getInvalidIteratorState () const =0 |
Signifies that the iterator has become invalid. | |
virtual bool | snapshotItem (XMLSize_t index)=0 |
Sets the current result to the indexth item in the snapshot collection. | |
virtual XMLSize_t | getSnapshotLength () const =0 |
The number of items in the result snapshot. | |
Non-standard Extension | |
virtual void | release ()=0 |
Called to indicate that this DOMXPathResult is no longer in use and that the implementation may relinquish any resources associated with it. | |
Protected Member Functions | |
Hidden constructors | |
DOMXPathResult () |
DOMXPathResult
interface represents the result of the evaluation of an XPath 1.0 or XPath 2.0 expression within the context of a particular node.
Since evaluation of an XPath expression can result in various result types, this object makes it possible to discover and manipulate the type and value of the result.
Note that some function signatures were changed compared to the DOM Level 3 in order to accommodate XPath 2.0.
|
ANY_TYPE
ANY_UNORDERED_NODE_TYPE
BOOLEAN_TYPE
FIRST_ORDERED_NODE_TYPE
NUMBER_TYPE
ORDERED_NODE_ITERATOR_TYPE
ORDERED_NODE_SNAPSHOT_TYPE
STRING_TYPE
UNORDERED_NODE_ITERATOR_TYPE
UNORDERED_NODE_SNAPSHOT_TYPE
FIRST_RESULT_TYPE
ITERATOR_RESULT_TYPE
SNAPSHOT_RESULT_TYPE |
|
|
|
Destructor.
|
|
Returns the boolean value of this result.
|
|
Returns the integer value of this result (XPath 2 only).
|
|
Signifies that the iterator has become invalid.
|
|
Returns the node value of this result.
|
|
Returns the number value of this result.
|
|
Returns the result type of this result.
|
|
The number of items in the result snapshot. Valid values for snapshotItem indices are 0 to snapshotLength-1 inclusive.
|
|
Returns the string value of this result.
|
|
Returns the DOM type info of the current result node or value (XPath 2 only).
|
|
Returns true if the result has a current result and the value is a node (XPath 2 only). This function is necessary to distinguish between a string value and a node of type string as returned by the getTypeInfo() function.
|
|
Iterates and returns true if the current result is the next item from the sequence or false if there are no more items.
|
|
Called to indicate that this DOMXPathResult is no longer in use and that the implementation may relinquish any resources associated with it. Access to a released object will lead to unexpected result. |
|
Sets the current result to the indexth item in the snapshot collection. If index is greater than or equal to the number of items in the list, this method returns false. Unlike the iterator result, the snapshot does not become invalid, but may not correspond to the current document if it is mutated.
|