Table D6 XPath Navigator Navigation Methods

Method Name

Description

MoveTo

Takes an XPathNavigator as a parameter and moves the current position of the navigator it is called on to the same node as the navigator that is passed as the parameter. You can achieve a similar result by calling the Clone method on an existing navigator to obtain a new navigator object positioned on the same node within the document.

MoveToNext

Moves to the next sibling node at the same level in the hierarchy. Does not apply to attributes or namespace nodes.

MoveToPrevious

Moves to the previous sibling node at the same level in the hierarchy. Does not apply to attributes or namespace nodes.

MoveTo First

Moves to the first sibling node at the same level in the hierarchy. Does not apply to attributes or namespace nodes.

MoveToFirstChild

Moves to the first child node of the current node. Does not apply to attributes or namespace nodes.

MoveToParent

Moves to the parent node of the current node. Does not apply to attributes or namespace nodes.

MoveTo Root

Moves to the root of the document.

0 0

Post a comment