System.Xml.XmlDataDocument.SafeFirstChild C# (CSharp) Méthode

SafeFirstChild() private méthode

private SafeFirstChild ( XmlNode n ) : XmlNode
n XmlNode
Résultat XmlNode
        internal XmlNode SafeFirstChild(XmlNode n)
        {
            XmlBoundElement be = n as XmlBoundElement;
            if (be != null)
                return be.SafeFirstChild;
            else
                //other type of node should be already foliated.
                return n.FirstChild;
        }

Usage Example

Exemple #1
0
        internal bool MoveToFirstChild()
        {
            RealFoliate();
            AssertValid();
            if (_node == null)
            {
                return(false);
            }

            if (_column != null)
            {
                if (_fOnValue)
                {
                    return(false);
                }

                _fOnValue = true;
                return(true);
            }
            else if (!IsFoliated(_node))
            {
                // find virtual column elements first
                DataColumn c = NextColumn(Row, null, false, false);
                if (c != null)
                {
                    MoveTo(_node, c, _doc.IsTextOnly(c));
                    return(true);
                }
            }

            // look for anything
            XmlNode n = _doc.SafeFirstChild(_node);

            if (n != null)
            {
                MoveTo(n);
                return(true);
            }

            return(false);
        }
XmlDataDocument