MoveToNode Method (XDATA)
9.8A
The MoveToNode method sets the current node position specified by the {position} value. The method uses the following format:
|
|
|
|
Where:
Flags Affected: EOS, OVER, ZERO
Note the following:
The ZERO flag is set if the {return} value is zero.
The OVER flag is set TRUE if the {return} variable is too small where the returned value is truncated.
The EOS flag is always cleared.
The {position} values can be specified in one of three formats as follows:
Static Defined Position Values
|
Keyword |
Value |
|
MOVE_CURRENT_NODE |
0 |
|
MOVE_PARENT_NODE |
1 |
|
MOVE_FIRST_CHILD |
2 |
|
MOVE_PREVIOUS_SIBLING |
4 |
|
MOVE_NEXT_SIBLING |
5 |
|
MOVE_DOCUMENT_NODE |
6 |
GetPosition Direct Values
The {return} position value from the 'GetPosition' method identifies a unique number assigned to each node in the node tree. This 'GetPosition' value can be used in the MoveToNode {position} to position directly to a node in the node tree.
Combined Pre-Defined Plus GetPosition Direct Values
In this case, the MoveToNode operation is performed in two steps as follows:
1) The first step is to use the <getposition value> to position directly to a node.
2) The second step is to use the <static> position value to perform the final positioning action starting from the position in the first step.
Example:
The {return} value is a zero if the method execution is successful. Otherwise, a non-zero value is returned to indicate an error has occurred. See the XDATA Method Return Values for more details.
This method can return these values:
|
Value |
Meaning |
|
0 |
XDATA_ERR_NONE (Success) |
|
2 |
XDATA_ERR_INVALID_POSITION_TYPE |
|
4 |
XDATA_ERR_NODE_NOT_FOUND |
|
11 |
XDATA_ERR_INVALID_POSITION |
See Also: XDATA, XDATA Methods, Method Syntax
![]() |