Difference (XmlNodelist function): Difference between revisions

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


This function creates an XmlNodelist that is the difference of
This function creates an <var>XmlNodelist</var> that is the difference of
(that is, it removes nodes from) one XmlNodelist and another.
(that is, it removes nodes from) one <var>XmlNodelist</var> and another.
==Syntax==
==Syntax==
{{Template:XmlNodelist:Difference syntax}}
{{Template:XmlNodelist:Difference syntax}}
Line 8: Line 8:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%nlis</th>
<tr><th>%nlis</th>
<td>An XmlNodelist that is set to point to the nodelist that is created. </td></tr>
<td>An <var>XmlNodelist</var> that is set to point to the nodelist that is created. </td></tr>
<tr><th>inNlis</th>
<tr><th>inNlis</th>
<td>An XmlNodelist. </td></tr>
<td>An <var>XmlNodelist</var>. </td></tr>
<tr><th>inNlis2</th>
<tr><th>inNlis2</th>
<td>An XmlNodelist; nodes on this nodelist are removed from <i>inNlis</i> to create the result.</td></tr>
<td>An <var>XmlNodelist</var>; nodes on this nodelist are removed from <i>inNlis</i> to create the result.</td></tr>
</table>
</table>


==Usage notes==
==Usage notes==
<ul>
<ul>
<li>Difference only affects the nodes created on <i>nlis</i>;
<li><var>Difference</var> only affects the nodes created on <i>nlis</i>;
it does not modify the XmlDoc, <i>inNlis</i>, nor <i>inNlis2</i>.
it does not modify the <var>XmlDoc</var>, <i>inNlis</i>, nor <i>inNlis2</i>.
<li>The XmlDoc associated with <i>inNlis</i> and <i>nr</i> must be the same.
<li>The <var>XmlDoc</var> associated with <i>inNlis</i> and <i>nr</i> must be the same.
</ul>
</ul>


===Example===
===Example===


The following example will create an empty XmlNodelist:
The following example will create an empty <var>XmlNodelist</var>:
<p class="code">%empty = %nlis:Difference(%nlis)
<p class="code">%empty = %nlis:<var>Difference</var>(%nlis)
</p>
</p>


Another example that makes use of the Difference method is
Another example that makes use of the <var>Difference</var> method is
in the "Examples" section in [[SelectNodes (XmlDoc/XmlNode function)|SelectNodes]]
in the "Examples" section in [[SelectNodes (XmlDoc/XmlNode function)|SelectNodes]]


===Request-Cancellation Errors===
===Request-Cancellation Errors===
<ul>
<ul>
<li>The XmlDocs associated with <i>inNlis</i> and <i>inNlis2</i> are not the same.
<li>The <var>XmlDoc</var>s associated with <i>inNlis</i> and <i>inNlis2</i> are not the same.
<li>Insufficient free space exists in CCATEMP.
<li>Insufficient free space exists in CCATEMP.
</ul>
</ul>
Line 39: Line 39:
.if 1 = 0 .do
.if 1 = 0 .do


If you want to select nodes in a XmlDoc and remove them from a nodelist,
If you want to select nodes in a <var>XmlDoc</var> and remove them from a nodelist,
see [[??]] refid=$xmrmv..
see [[??]] refid=$xmrmv..



Revision as of 17:45, 25 January 2011

Difference between XmlNodelists (XmlNodelist class)


This function creates an XmlNodelist that is the difference of (that is, it removes nodes from) one XmlNodelist and another.

Syntax

%diffNodl = nodl:Difference( removeNodl)

Syntax terms

%nlis An XmlNodelist that is set to point to the nodelist that is created.
inNlis An XmlNodelist.
inNlis2 An XmlNodelist; nodes on this nodelist are removed from inNlis to create the result.

Usage notes

  • Difference only affects the nodes created on nlis; it does not modify the XmlDoc, inNlis, nor inNlis2.
  • The XmlDoc associated with inNlis and nr must be the same.

Example

The following example will create an empty XmlNodelist:

%empty = %nlis:Difference(%nlis)

Another example that makes use of the Difference method is in the "Examples" section in SelectNodes

Request-Cancellation Errors

  • The XmlDocs associated with inNlis and inNlis2 are not the same.
  • Insufficient free space exists in CCATEMP.

.if 1 = 0 .do

If you want to select nodes in a XmlDoc and remove them from a nodelist, see ?? refid=$xmrmv..

See also ?? refid=$xmplcl.. .do end

See also