XmlDocumentType.CloneNode(Boolean) 方法

定义

创建此节点的副本。Creates a duplicate of this node.

public:
 override System::Xml::XmlNode ^ CloneNode(bool deep);
public override System.Xml.XmlNode CloneNode (bool deep);
override this.CloneNode : bool -> System.Xml.XmlNode
Public Overrides Function CloneNode (deep As Boolean) As XmlNode

参数

deep
Boolean

若要递归地克隆指定节点下的子树,则为 true;若仅克隆节点本身,则为 falsetrue to recursively clone the subtree under the specified node; false to clone only the node itself. 对于文档类型节点,不管参数设置如何,克隆的节点总是包括子树。For document type nodes, the cloned node always includes the subtree, regardless of the parameter setting.

返回

XmlNode

克隆的节点。The cloned node.

注解

此方法用作节点的复制构造函数。This method serves as a copy constructor for nodes. 克隆的节点没有父 (ParentNode 返回 null) 。The cloned node has no parent (ParentNode returns null).

若要查看此方法与其他节点类型的行为,请参阅 XmlNode.CloneNodeTo see how this method behaves with other node types, see XmlNode.CloneNode.

适用于