New (XmlNodelist constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
{{Template:XmlNodelist:New subtitle}}
{{Template:XmlNodelist:New subtitle}}
<p>
<p>
This method creates an XmlNodelist object instance and takes one argument: the XmlDoc with which the XmlNodelist is associated.
This method creates an <var>XmlNodelist</var> object instance and takes one argument: the <var>XmlDoc</var> with which the <var>XmlNodelist</var> is associated.
==Syntax==
==Syntax==
{{Template:XmlNodelist:New syntax}}
{{Template:XmlNodelist:New syntax}}
Line 7: Line 7:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th><i>%xmldoc</i></th>
<tr><th><i>%xmldoc</i></th>
<td>A declared XmlDoc object variable to contain the new XmlDoc object instance. </td></tr>
<td>A declared <var>XmlDoc</var> object variable to contain the new <var>XmlDoc</var> object instance. </td></tr>
<tr><th><i>%xmlnlis</i></th>
<tr><th><i>%xmlnlis</i></th>
<td>A declared XmlNodelist object variable to contain the new XmlNodelist object instance. </td></tr>
<td>A declared <var>XmlNodelist</var> object variable to contain the new <var>XmlNodelist</var> object instance. </td></tr>
<tr><th><i>%doc</i></th>
<tr><th><i>%doc</i></th>
<td>A XmlDoc object variable which references the XmlDoc with which ''%xmlnlis'' is associated.</td></tr>
<td>A <var>XmlDoc</var> object variable which references the <var>XmlDoc</var> with which ''%xmlnlis'' is associated.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>New 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 alternatively as shown below, with an explicit class name
or with an object variable (even if that object is null):
or with an object variable (even if that object is null):
<p class="code">%xmldoc = %(XmlDoc):new
<p class="code">%xmldoc = %(<var>XmlDoc</var>):new


%xmlnlis = %xmlnlis:new(%doc)
%xmlnlis = %xmlnlis:new(%doc)
</p>
</p>
<li>Besides explicit New statements, XmlNodelists can be created by other
<li>Besides explicit <var>New</var> statements, <var>XmlNodelist</var>s can be created by other
XML methods (for example, see [[SelectNodes (XmlDoc/XmlNode function)|SelectNodes]],
XML methods (for example, see [[SelectNodes (XmlDoc/XmlNode function)|SelectNodes]],
[[??]] reftxt=UnionSelected refid=unionsl.,
[[??]] reftxt=UnionSelected refid=unionsl.,
and [[??]] reftxt=Difference refid=diff.).
and [[??]] reftxt=Difference refid=diff.).


An XmlDoc can only be instantiated by the New method, although an
An <var>XmlDoc</var> can only be instantiated by the <var>New</var> method, although an
XmlDoc can be returned or duplicated by a method
<var>XmlDoc</var> can be returned or duplicated by a method
(see [[??]] reftxt=XmlDoc refid=xdocfn. and [[??]] reftxt=Copy refid=copydoc.).
(see [[??]] reftxt=XmlDoc refid=xdocfn. and [[??]] reftxt=Copy refid=copydoc.).
</ul>
</ul>
==See also==
==See also==
{{Template:XmlNodelist:New footer}}
{{Template:XmlNodelist:New footer}}

Revision as of 17:45, 25 January 2011

Create a new XmlNodelist (XmlNodelist class)

This method creates an XmlNodelist object instance and takes one argument: the XmlDoc with which the XmlNodelist is associated.

Syntax

%nodl = [%(XmlNodelist):]New( doc)

Syntax terms

%xmldoc A declared XmlDoc object variable to contain the new XmlDoc object instance.
%xmlnlis A declared XmlNodelist object variable to contain the new XmlNodelist object instance.
%doc A XmlDoc object variable which references the XmlDoc with which %xmlnlis is associated.

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 %xmlnlis = %xmlnlis:new(%doc)

  • Besides explicit New statements, XmlNodelists can be created by other XML methods (for example, see SelectNodes, ?? reftxt=UnionSelected refid=unionsl., and ?? reftxt=Difference refid=diff.). An XmlDoc can only be instantiated by the New method, although an XmlDoc can be returned or duplicated by a method (see ?? reftxt=XmlDoc refid=xdocfn. and ?? reftxt=Copy refid=copydoc.).

See also