XmlDoc (XmlNode function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (edits, tags and links)
mNo edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Template:XmlNode:XmlDoc subtitle}}
{{Template:XmlNode:XmlDoc subtitle}}
<var>XmlDoc</var> returns the <var>xmlDoc</var> associated with the method object <var>xmlNode</var>.


==Syntax==
==Syntax==
Line 7: Line 6:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%doc</th>
<tr><th>%doc</th>
<td>An <var>xmlDoc</var>, which will be set to point to the document associated with <var class="term">nod</var>.</td></tr>
<td>An <var>XmlDoc</var>, which will be set to point to the document associated with object <var class="term">nod</var>.</td></tr>
<tr><th>nod</th>
<tr><th>nod</th>
<td>An <var>xmlNode</var> expression.</td></tr>
<td>An <var>XmlNode</var> expression.</td></tr>
</table>
</table>


==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The <var>xmlDoc</var> function can be used when it is necessary, for example, to get or set <var>XmlDoc</var> properties (such as <var>[[Namespace (XmlDoc property)|Namespace]]</var>) given an <var>XmlNode</var>.
<li>The <var>XmlDoc</var> function can be used when it is necessary, for example, to get or set <var>XmlDoc</var> properties (such as <var>[[Namespace (XmlDoc property)|Namespace]]</var>) given an <var>XmlNode</var>.
</ul>
</ul>


==Examples==
==Examples==
<ol><li>In the following example, the <var>Namespace</var> property is temporarily changed during the execution of a local subroutine:
In the following example, the <var>Namespace</var> property is temporarily changed during the execution of a local subroutine:
<p class="code">local subroutine (xmlNode):display
<p class="code">local subroutine (xmlNode):display


Line 28: Line 27:


end subroutine
end subroutine
</p></ol>
</p>


==Request-Cancellation Errors/==
==Request-cancellation errors==
<ul>
 
<li><var>xmlDoc</var> has no request cancellation errors.
<var>XmlDoc</var> has no request cancellation errors.
</ul>


==See also==
==See also==
{{Template:XmlNode:XmlDoc footer}}
{{Template:XmlNode:XmlDoc footer}}

Latest revision as of 17:54, 7 June 2011

Get the XmlDoc associated with this node (XmlNode class)


Syntax

%doc = nod:XmlDoc

Syntax terms

%doc An XmlDoc, which will be set to point to the document associated with object nod.
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) given an XmlNode.

Examples

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

local 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.

See also