public void EndCopy(XPathNavigator navigator) { if (navigator.NodeType == XPathNodeType.Element) WriteEndElement(); else Debug.Assert(navigator.NodeType == XPathNodeType.Root, "EndCopy should only be called for Element and Document nodes."); }