The XPathNavigator enables you to move through both the attributes
nodes and the namespace nodes in an XML document.
The methods and properties of the XPathNavigator operate in
relation to the current node:
- The MoveToFirstChild method moves to the first child of the
- The MoveToParent method moves to the parent node of the
current node. When positioned on an attribute, you must use the
MoveToParent method to move to the element that owns the
attribute node. This is how you get back to the element after
navigating through its attributes using MoveToFirstAttribute and
- The HasChildren property indicates whether the current node
has child nodes.
- The HasAttributes property indicates whether the current
node has attribute nodes.
- The MoveToRoot method sets the navigator to the document
node that contains the whole tree of nodes.