New (XmlNodelist constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 20: Line 20:
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):
<pre>
<p class="code">%xmldoc = %(XmlDoc):new
    %xmldoc = %(XmlDoc):new


    %xmlnlis = %xmlnlis:new(%doc)
%xmlnlis = %xmlnlis:new(%doc)
</pre>
</p>
<li>Besides explicit New statements, XmlNodelists can be created by other
<li>Besides explicit New statements, XmlNodelists 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]],

Revision as of 05:43, 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