XmlDoc (XmlNodelist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
Line 1: Line 1:
{{Template:XmlNodelist:XmlDoc subtitle}}
{{Template:XmlNodelist:XmlDoc subtitle}}
<var>XmlDoc</var> returns the <var>xmlDoc</var> associated with the method object <var>XmlNodelist</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">nodl</var>.</td></tr>
<td>An <var>XmlDoc</var>, which will be set to point to the document associated with object <var class="term">nodl</var>.</td></tr>
<tr><th>nodl</th>
<tr><th>nodl</th>
<td>An <var>XmlNodeList</var> expression.</td></tr>
<td>An <var>XmlNodeList</var> expression.</td></tr>
Line 14: Line 13:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The <var>xmlDoc</var> function can be used when it is necessary to get or set <var>XmlDoc</var> properties (such as <var>[[Namespace (XmlDoc property)|Namespace]]</var>) given an <var>xmlNodelist</var>.
<li>The <var>XmlDoc</var> function can be used when it is necessary to get or set <var>XmlDoc</var> properties (such as <var>[[Namespace (XmlDoc property)|Namespace]]</var>) given an <var>XmlNodelist</var>.
</ul>
</ul>


==Examples==
==Examples==
You can use <var>XmlDoc</var> to access the <var>Root</var> node (and then, optionally, to use an <var>[[XPath#XPath_syntax|Xpath expression]]</var> which is in effect an absolute expression) with an empty <var>xmlNodelist</var>, as in the following example:
You can use <var>XmlDoc</var> to access the <var>Root</var> node (and then, optionally, to use an [[XPath#XPath_syntax|Xpath expression]] which is in effect an absolute expression) with an empty <var>XmlNodelist</var>, as in the following example:
<p class="code">local subroutine (xmlNodelist):display
<p class="code">local subroutine (xmlNodelist):display
   if %this:[[Count_(XmlNodelist_function)|count]] eq 0 then
   if %this:[[Count_(XmlNodelist_function)|count]] eq 0 then
Line 29: Line 28:


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


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

Latest revision as of 17:57, 7 June 2011

Get the XmlDoc associated with this nodelist (XmlNodelist class)


Syntax

%doc = nodl:XmlDoc

Syntax terms

%doc An XmlDoc, which will be set to point to the document associated with object nodl.
nodl An XmlNodeList expression.

Usage notes

  • The XmlDoc function can be used when it is necessary to get or set XmlDoc properties (such as Namespace) given an XmlNodelist.

Examples

You can use XmlDoc to access the Root node (and then, optionally, to use an Xpath expression which is in effect an absolute expression) with an empty XmlNodelist, as in the following example:

local subroutine (xmlNodelist):display if %this:count eq 0 then printText Nodelist empty, here is the document: %this:xmlDoc:print else ... end if

Request-cancellation errors

XmlDoc has no request cancellation errors.

See also