DeepCopy (XmlNode function)

From m204wiki
Revision as of 00:13, 7 December 2010 by 198.242.244.47 (talk) (Created page with "<span style="font-size:120%; color:black"><b>Copy an XmlDoc or XmlNode</b></span> DeepCopy function DeepCopy function [[C...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Copy an XmlDoc or XmlNode

DeepCopy is a member of the XmlDoc and XmlNode classes.

This method returns an exact copy of an XmlDoc or XmlNode method object.

For XmlDocs, DeepCopy is identical to the XmlDoc Copy method (??Copy). Since an XmlNode cannot exist without its underlying XmlDoc, however, an XmlNode is deep copyable only, and no Copy method exists for an XmlNode.

For more information about copyability, see Copying objects.

Syntax

  %dcop = %xmlobj:DeepCopy

Syntax Terms

%dcop
An XmlDoc or XmlNode object variable to contain the deep copy of %xmlobj. %dcop does not have to be empty (?? refid=dstates.).
%xmlobj
An XmlDoc or XmlNode object expression.

Usage Notes

  • The method object (%xmlobj) may be null. The output of a copy of a null object is a null object.
  • For an XmlNode, a DeepCopy copies the underlying XmlDoc and sets the output XmlNode to the node in the new XmlDoc that corresponds to the input XmlNode. The AddSubtree method (??AddSubtree) performs a different kind of copy: it copies a specified XmlNode and appends it to the method object.