DeepCopy (XmlNode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>Copy an XmlDoc or XmlNode</b></span>
{{Template:XmlNode:DeepCopy subtitle}}
[[Category:XmlNode methods|DeepCopy function]]
[[Category:XmlNode methods|DeepCopy function]]
[[Category:XmlDoc API methods]]
[[Category:XmlDoc API methods]]
Line 8: Line 8:


For more information about copyability, see [[Copying objects]].
For more information about copyability, see [[Copying objects]].
===Syntax===
==Syntax==
  %dcop = %xmlobj:DeepCopy
{{Template:XmlNode:DeepCopy syntax}}
 
===Syntax terms===
====Syntax Terms====
<dl>
<dl>
<dt>%dcop
<dt>%dcop
Line 21: Line 20:


</dl>
</dl>
===Usage Notes===
==Usage notes==
<ul>
<ul>
<li>The method object (''%xmlobj'') may be null.
<li>The method object (''%xmlobj'') may be null.

Revision as of 05:00, 23 January 2011

Deep copy this node (XmlNode class)

This method returns an exact copy of an XmlNode method object. Since an XmlNode cannot exist without its underlying XmlDoc, an XmlNode is deep copyable only, and no Copy method exists for an XmlNode. For more information about copyability, see Copying objects.

Syntax

%outNod = nod: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.
  • 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 performs a different kind of copy: it copies a specified XmlNode and appends it to the method object.