Moves to the node with an ID attribute whose value matches the specified string.
[Visual Basic] MustOverride Public Function MoveToId( _ ByVal id As String _ ) As Boolean [C#] public abstract bool MoveToId( string id ); [C++] public: virtual bool MoveToId( String* id ) = 0; [JScript] public abstract function MoveToId( id : String ) : Boolean;
Throws IdNotFoundException if the id was not defined in the data.
The argument does not need to be atomized. For example, suppose the DTD defined the following:
<!ATTLIST x a ID #REQUIRED >
and suppose the following XML data was loaded using this DTD:
<data> <x a="a1"/> </data>
then the following would be true:
[C#]
// "nav" pointing anywhere in the above data. nav.MoveToId("a1"); // Now "nav" points to the element node named "x"
XmlNavigator Class | XmlNavigator Members | System.NewXml Namespace