New (XmlDoc constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (edits, tags and links)
Line 1: Line 1:
{{Template:XmlDoc:New subtitle}}
{{Template:XmlDoc:New subtitle}}
This method creates an <var>XmlDoc</var> object instance and takes no arguments.
<var>New</var> creates an <var>XmlDoc</var> object instance and takes no arguments.
 
==Syntax==
==Syntax==
{{Template:XmlDoc:New syntax}}
{{Template:XmlDoc:New syntax}}
Line 11: Line 12:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li><var>New</var> can be invoked with no object (as in the syntax box above),
<li><var>New</var> can be invoked with no object (as in the syntax box above), or alternatively as shown below, with an explicit class name or with an object variable (even if that object is null):
or alternatively as shown below, with an explicit class name
<p class="code">%xmldoc = %(XmlDoc):new
or with an object variable (even if that object is null):
<p class="code">%xmldoc = %(<var>XmlDoc</var>):new
</p>
</p>
<li>An <var>XmlDoc</var> can only be instantiated by either the <var>New</var> method or by making a copy of an existing <var>XmlDoc</var> via the <var>[[Copy (XmlDoc function)|Copy]]</var> or <var>[[DeepCopy (XmlDoc/XmlNode function)|DeepCopy]]</var> method.
<li>An <var>XmlDoc</var> can only be instantiated by either the <var>New</var> method or by making a copy of an existing <var>XmlDoc</var> via the <var>[[Copy (XmlDoc function)|Copy]]</var> or <var>[[DeepCopy (XmlDoc/XmlNode function)|DeepCopy]]</var> methods.
</ul>
</ul>
==See also==
==See also==
{{Template:XmlDoc:New footer}}
{{Template:XmlDoc:New footer}}

Revision as of 12:10, 27 April 2011

Create a new XmlDoc object (XmlDoc class)

New creates an XmlDoc object instance and takes no arguments.

Syntax

%doc = [%(XmlDoc):]New

Syntax terms

%doc A declared XmlDoc object variable to contain the new XmlDoc object instance.

Usage notes

  • New can be invoked with no object (as in the syntax box above), or alternatively as shown below, with an explicit class name or with an object variable (even if that object is null):

    %xmldoc = %(XmlDoc):new

  • An XmlDoc can only be instantiated by either the New method or by making a copy of an existing XmlDoc via the Copy or DeepCopy methods.

See also