Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XPathNavigator::MoveToNext Method (XPathNodeType)

 

Moves the XPathNavigator to the next sibling node of the current node that matches the XPathNodeType specified.

Namespace:   System.Xml.XPath
Assembly:  System.Xml (in System.Xml.dll)

public:
virtual bool MoveToNext(
	XPathNodeType type
)

Parameters

type
Type: System.Xml.XPath::XPathNodeType

The XPathNodeType of the sibling node to move to.

Return Value

Type: System::Boolean

true if the XPathNavigator is successful moving to the next sibling node; otherwise, false if there are no more siblings or if the XPathNavigator is currently positioned on an attribute node. If false, the position of the XPathNavigator is unchanged.

The return value of the MoveToNext method depends on the XPathNodeType of the current node and the XPathNodeType of the next sibling node to move to.

The following table shows the different XPathNodeType nodes and the sibling nodes they can move to.

Current Node's XPathNodeType

Sibling Node's XPathNodeType

Element

Element, ProcessingInstruction, Comment, or Text.

Text

Element, ProcessingInstruction, Comment, or Text.

ProcessingInstruction

Element, ProcessingInstruction, Comment, or Text.

Comment

Element, ProcessingInstruction, Comment, or Text.

All other XPathNodeType values

None.

.NET Framework
Available since 2.0
Silverlight
Available since 4.0
Return to top
Show:
© 2017 Microsoft