DOM/DOMXPathNavigator.php
public function MoveToNext( $kind = XPathNodeType::All )
	{
		if ( is_null( $this->domNode ) || is_null( $kind ) /* || ! $this->domNode instanceof \DOMElement */ ) return false;

		// Create a list of the valid DOM node types based on the $kind value
		$domNodeTypes = array_keys( array_filter(
			DOMXPathNavigator::$nodeTypeMap,
			function( $nodeType ) use( $kind )
			{
				return $kind == XPathNodeType::All || $nodeType == $kind;
			}
		) );

		// Take a copy of the dom node
		$next = $this->domNode;
		while( ! is_null( $next = $next->nextSibling ) )
		{
			// If the $next node type is valid then store the next node type as the new dom node and return true
			if ( in_array( $next->nodeType, $domNodeTypes ) )
			{
				$this->domNode = $next;
				return true;
			}
		}

		return false;
	}
public function MoveToNext( $kind = XPathNodeType::All )
	{
		if ( is_null( $this->domNode ) || is_null( $kind ) /* || ! $this->domNode instanceof \DOMElement */ ) return false;

		// Create a list of the valid DOM node types based on the $kind value
		$domNodeTypes = array_keys( array_filter(
			DOMXPathNavigator::$nodeTypeMap,
			function( $nodeType ) use( $kind )
			{
				return $kind == XPathNodeType::All || $nodeType == $kind;
			}
		) );

		// Take a copy of the dom node
		$next = $this->domNode;
		while( ! is_null( $next = $next->nextSibling ) )
		{
			// If the $next node type is valid then store the next node type as the new dom node and return true
			if ( in_array( $next->nodeType, $domNodeTypes ) )
			{
				$this->domNode = $next;
				return true;
			}
		}

		return false;
	}
public function MoveToNext ( $ kind = XPathNodeType :: All ) { if ( is_null ( $ this -> domNode ) || is_null ( $ kind ) /* || ! $this->domNode instanceof \DOMElement */ ) return false ; // Create a list of the valid DOM node types based on the $kind value
 $ domNodeTypes = array_keys ( array_filter ( DOMXPathNavigator :: $ nodeTypeMap , function ( $ nodeType ) use ( $ kind ) { return $ kind == XPathNodeType :: All || $ nodeType == $ kind ; } ) ) ; // Take a copy of the dom node
 $ next = $ this -> domNode ; while ( ! is_null ( $ next = $ next -> nextSibling ) ) { // If the $next node type is valid then store the next node type as the new dom node and return true
 if ( in_array ( $ next -> nodeType , $ domNodeTypes ) ) { $ this -> domNode = $ next ; return true ; } } return false ; }
Moves the XPathNavigator to the next sibling node of the current
node that matches the XPathNodeType specified.

@param XPathNodeType $kind : (optional) The XPathNodeType of the sibling node to move to.
@return bool 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.
Moves the XPathNavigator to the next sibling node of the current node that matches the XPathNodeType specified .