System.Xml.Xsl.Runtime.XmlQueryOutput.CopyNamespacesHelper C# (CSharp) Méthode

CopyNamespacesHelper() private méthode

Recursive helper function that reverses order of the namespaces retrieved by MoveToFirstNamespace and MoveToNextNamespace.
private CopyNamespacesHelper ( XPathNavigator navigator, XPathNamespaceScope nsScope ) : void
navigator System.Xml.XPath.XPathNavigator
nsScope XPathNamespaceScope
Résultat void
        private void CopyNamespacesHelper(XPathNavigator navigator, XPathNamespaceScope nsScope) {
            string prefix = navigator.LocalName;
            string ns = navigator.Value;

            if (navigator.MoveToNextNamespace(nsScope))
                CopyNamespacesHelper(navigator, nsScope);

            // No possibility for conflict, since we're copying namespaces from well-formed element
            WriteNamespaceDeclarationUnchecked(prefix, ns);
        }