DeepCopy (XmlNode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
{{Template:XmlNode:DeepCopy subtitle}}
{{Template:XmlNode:DeepCopy subtitle}}


This method returns an exact copy of an XmlNode method object.
This method returns an exact copy of an <var>XmlNode</var> 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.
Since an <var>XmlNode</var> cannot exist without its underlying <var>XmlDoc</var>, an <var>XmlNode</var> is deep copyable only, and no Copy method exists for an <var>XmlNode</var>.


For more information about copyability, see [[Copying objects]].
For more information about copyability, see [[Copying objects]].
Line 23: Line 23:
The [[AddSubtree (XmlDoc/XmlNode function)|AddSubtree]] method
The [[AddSubtree (XmlDoc/XmlNode function)|AddSubtree]] method
performs a different kind of copy:
performs a different kind of copy:
it copies a specified XmlNode and appends it to the method object.
it copies a specified <var>XmlNode</var> and appends it to the method object.
</ul>
</ul>
==See also==
==See also==
{{Template:XmlNode:DeepCopy footer}}
{{Template:XmlNode:DeepCopy footer}}

Revision as of 17:46, 25 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

%object An xmlNode object variable to contain the deep copy of nod.
nod An xmlNode object expression.

Usage notes

  • The method object (nod) 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.

See also