DeepCopy (XmlNode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (AllowNullObject methods)
 
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Template:XmlNode:DeepCopy subtitle}}
{{Template:XmlNode:DeepCopy subtitle}}
<var>DeepCopy</var> returns an exact copy of an <var>XmlNode</var> method object.


This method returns an exact copy of an <var>XmlNode</var> method object.
Since an <var>XmlNode</var> cannot exist without its underlying <var>XmlDoc</var>, an <var>XmlNode</var> is deep copyable only, and no <var>Copy</var> method exists for an <var>XmlNode</var>.  For further information about copyability, see [[Copying objects|"Copying objects"]].


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]].
==Syntax==
==Syntax==
{{Template:XmlNode:DeepCopy syntax}}
{{Template:XmlNode:DeepCopy syntax}}
Line 11: Line 9:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%outNod</th>
<tr><th>%outNod</th>
<td>An <var>xmlNode</var> object variable to contain the deep copy of <var class="term">nod</var>.
<td>An <var>XmlNode</var> object variable to contain the deep copy of <var class="term">nod</var>.
<tr><th>nod</th>
<tr><th>nod</th>
<td>An <var>xmlNode</var> object expression, which may be <var>Null</var>.</td></tr>
<td>An <var>XmlNode</var> object expression, which may be <var>Null</var>.</td></tr>
</table>
</table>


==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The method object (<var class="term">nod</var>) may be null.
<li>The method object (<var class="term">nod</var>) may be <var>Null</var>. The output of a copy of a <var>Null</var> object is a <var>Null</var> object.
The output of a copy of a null object is a null object.
<li><var>DeepCopy</var> copies the underlying <var>XmlDoc</var> and sets the output <var>XmlNode</var> to the node in the new <var>XmlDoc</var> that corresponds to the input <var>XmlNode</var>.
<li>A <var>deepCopy</var> copies the underlying <var>xmlDoc</var> and sets the output <var>xmlNode</var> to the node in the new <var>xmlDoc</var> that corresponds to the input <var>xmlNode</var>.
The [[AddSubtree (XmlDoc/XmlNode function)|AddSubtree]] method
performs a different kind of copy:
it copies a specified <var>XmlNode</var> and appends it to the method object.
</ul>
</ul>
==See also==
==See also==
<ul><li><var>[[AddSubtree (XmlDoc/XmlNode function)|AddSubtree]]</var> copies a specified <var>XmlNode</var>, appending it to the method object.
</ul>
{{Template:XmlNode:DeepCopy footer}}
{{Template:XmlNode:DeepCopy footer}}

Latest revision as of 21:17, 31 May 2011

Deep copy this node (XmlNode class)

DeepCopy 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 further information about copyability, see "Copying objects".

Syntax

%outNod = nod:DeepCopy

Syntax terms

%outNod An XmlNode object variable to contain the deep copy of nod.
nod An XmlNode object expression, which may be Null.

Usage notes

  • The method object (nod) may be Null. The output of a copy of a Null object is a Null object.
  • DeepCopy copies the underlying XmlDoc and sets the output XmlNode to the node in the new XmlDoc that corresponds to the input XmlNode.

See also

  • AddSubtree copies a specified XmlNode, appending it to the method object.