XmlDoc (XmlNode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 7: Line 7:
{{Template:XmlNode:XmlDoc syntax}}
{{Template:XmlNode:XmlDoc syntax}}
===Syntax terms===
===Syntax terms===
<dl>
<table class="syntaxTable">
<dt>%doc
<tr><th>%doc</th>
<dd>An <var>xmlDoc</var>, which will be set to point to the document associated with
<td>An <var>xmlDoc</var>, which will be set to point to the document associated with <i>nod</i> or <i>nlis</i>. </td></tr>
<i>nod</i> or <i>nlis</i>.
<tr><th>nod</th>
<dt>nod
<td>An XmlNode expression.</td></tr>
<dd>An XmlNode expression.
</table>
</dl>


==Usage notes==
==Usage notes==

Revision as of 15:13, 23 January 2011

Get the XmlDoc associated with this node (XmlNode class)

This function returns the xmlDoc associated with the method object.

Syntax

%doc = nod:XmlDoc

Syntax terms

%doc An xmlDoc, which will be set to point to the document associated with nod or nlis.
nod An XmlNode expression.

Usage notes

  • The xmlDoc function can be used when it is necessary, for example, to get or set xmlDoc properties (such as ??[[Namespace (xmlDoc property)|Namespace]]) given an XmlNode or XmlNodelist.

Examples

In the following example, the Namespace property is temporarily changed during the execution of a subroutine:

loc subroutine (xmlNode):display %old enumeration xmlNamespaceSetting %old = %this:xmlDoc:namespace %this:xmlDoc:namespace = 'Ignore' %this:selectSingleNode('*[model<"C3PO"']):Print %this:xmlDoc:namespace = %old end subroutine

Request-Cancellation Errors

  • xmlDoc has no request cancellation errors.