System.Xml.Xsl.Runtime.XmlMergeSequenceWriter.CopyNamespaces C# (CSharp) Method

CopyNamespaces() private method

Copy all or some (which depends on nsScope) of the namespaces on the navigator's current node to the raw writer.
private CopyNamespaces ( XPathNavigator nav, XPathNamespaceScope nsScope ) : void
nav System.Xml.XPath.XPathNavigator
nsScope XPathNamespaceScope
return void
        private void CopyNamespaces(XPathNavigator nav, XPathNamespaceScope nsScope) {
            string prefix = nav.LocalName;
            string ns = nav.Value;

            if (nav.MoveToNextNamespace(nsScope)) {
                CopyNamespaces(nav, nsScope);
            }

            this.xwrt.WriteNamespaceDeclaration(prefix, ns);
        }
    }