NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlNavigator.MoveToId

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;

Parameters

id
The ID value of the node you want to move to.

Return Value

Throws IdNotFoundException if the id was not defined in the data.

Remarks

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"

See Also

XmlNavigator Class | XmlNavigator Members | System.NewXml Namespace