[Visual Basic]
MustInherit Public Class XmlNavigator
Implements ICloneable
[C#]
public abstract class XmlNavigator : ICloneable
[C++]
public __gc __abstract class XmlNavigator : public ICloneable
[JScript]
public abstract class XmlNavigator implements ICloneable
Remarks
XmlNavigator provides all the node and attribute properties of the XmlReader. However, the XmlNavigator adds the following features:
Allows node and attribute properties to be set
Provides random access navigation (whereas XmlReader is a forward-only reader)
Enables you to handle a selected set of nodes within the document.
The XmlNavigator is always positioned on a node. If a method call fails, the XmlNavigator remains in the position it was in before the method call. The XmlNavigator provides a virtual window into a tree of nodes. This has the following implications:
When the virtual node that the XmlNavigator is pointing to is removed from the tree, or moved to a different tree the XmlNavigator continues to point at that moved node and MoveToParent may return something different than you expected.
MoveToNext and MoveToPrevious do not walk off the end of the list leaving the XmlNavigator in an indeterminate state. This model is easier for programmers to understand.
When the virtual node that the XmlNavigator is pointing to is moved to a different location in the tree, the XmlNavigator is moved along with it.