System.Xml.DocumentXPathNavigator.PathHasDuplicateNamespace C# (CSharp) Méthode

PathHasDuplicateNamespace() private méthode

private PathHasDuplicateNamespace ( XmlElement top, XmlElement bottom, string localName ) : bool
top XmlElement
bottom XmlElement
localName string
Résultat bool
        private bool PathHasDuplicateNamespace(XmlElement top, XmlElement bottom, string localName) {
            string namespaceUri = document.strReservedXmlns;
            while (bottom != null
                   && bottom != top) {
                XmlAttribute attribute = bottom.GetAttributeNode(localName, namespaceUri);
                if (attribute != null) {
                    return true;
                }
                bottom = bottom.ParentNode as XmlElement;
            }
            return false;
        }