System.Xml.XPathNodePointer.MoveToNextSibling C# (CSharp) Method

MoveToNextSibling() private method

private MoveToNextSibling ( ) : bool
return bool
        internal bool MoveToNextSibling()
        {
            RealFoliate();
            AssertValid();
            if (_node != null)
            {
                if (_column != null)
                {
                    if (_fOnValue)
                    {
                        // _fOnValue could be true only when the column is mapped as simplecontent or element
                        Debug.Assert(_column.ColumnMapping != MappingType.Attribute && _column.ColumnMapping != MappingType.Hidden);
                        return false;
                    }
                    DataRow curRow = Row;
                    DataColumn c = NextColumn(curRow, _column, false);
                    while (c != null)
                    {
                        if (IsValidChild(_node, c))
                        {
                            MoveTo(_node, c, _doc.IsTextOnly(c));
                            return true;
                        }
                        c = NextColumn(curRow, c, false);
                    }
                    XmlNode n = _doc.SafeFirstChild(_node);
                    if (n != null)
                    {
                        MoveTo(n);
                        return true;
                    }
                }
                else
                {
                    XmlNode n = _node;
                    XmlNode parent = _node.ParentNode;
                    if (parent == null)
                        return false;
                    bool bTextLike = XmlDataDocument.IsTextNode(_node.NodeType);
                    do
                    {
                        do
                        {
                            n = _doc.SafeNextSibling(n);
                        } while (n != null && bTextLike && XmlDataDocument.IsTextNode(n.NodeType));
                    } while (n != null && !IsValidChild(parent, n));
                    if (n != null)
                    {
                        MoveTo(n);
                        return true;
                    }
                }
            }
            return false;
        }