# Node Set Navigation Using XPathNavigator

You can navigate over nodes in an XPathDocument or XmlDocument object using the node set navigation methods of the XPathNavigator class. You can navigate over all the nodes or over a selected set of nodes returned by one of the selection methods of the XPathNavigator class.

The XPathNavigator class provides several methods used to navigate element nodes. The following table shows the navigation methods available and a description of how they move; this does not include methods used to navigate attribute and namespace nodes.

Method Description
MoveTo Moves the XPathNavigator to the same position of the XPathNavigator specified.
MoveToChild Moves the XPathNavigator to a child node of the current node.
MoveToFirst Moves the XPathNavigator to the first sibling node of the current node.
MoveToFirstChild Moves the XPathNavigator to the first child node of the current node.
MoveToFollowing Moves the XPathNavigator to the specified element in document order.
MoveToId Moves the XPathNavigator to the node that has an attribute of type ID with a value that matches the given String.
MoveToNext Moves the XPathNavigator to the next sibling node of the current node.
MoveToParent Moves the XPathNavigator to the parent node of the current node.
MoveToPrevious Moves the XPathNavigator to the previous sibling node of the current node.
MoveToRoot Moves the XPathNavigator to the root node of the XML document.