XmlDoc (XmlNodelist function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 3: | Line 3: | ||
[[Category:XmlNodelist methods|XmlDoc function]] | [[Category:XmlNodelist methods|XmlDoc function]] | ||
[[Category:XmlDoc API methods]] | [[Category:XmlDoc API methods]] | ||
<!--DPL?? Category:XmlNode methods|XmlDoc function: XmlDoc object of XmlNode or XmlNodelist--> | <!--DPL?? Category:XmlNode methods|XmlDoc function: XmlDoc object of XmlNode or XmlNodelist--> | ||
<!--DPL?? Category:XmlNodelist methods|XmlDoc function: XmlDoc object of XmlNode or XmlNodelist--> | <!--DPL?? Category:XmlNodelist methods|XmlDoc function: XmlDoc object of XmlNode or XmlNodelist--> |
Revision as of 20:14, 31 December 2010
XmlDoc object of XmlNode or XmlNodelist
XmlDoc is a member of the XmlNode and XmlNodelist classes.
This function returns the XmlDoc associated with the method object.
Syntax
%doc = nod:XmlDoc
%doc = nlis:XmlDoc
Syntax Terms
- %doc
- An XmlDoc, which will be set to point to the document associated with nod or nlis.
- nod
- An XmlNode expression.
- nlis
- An XmlNodelist 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 or XmlNodelist.
Examples
- In the following example, the Namespace property is temporarily changed
during the execution of a subroutine:
Subroutine disp(%n Object XmlNode) %old Enumeration XmlNamespaceSetting %old = %n:XmlDoc:Namespace %n:XmlDoc:Namespace = 'Ignore' %n:SelectSingleNode('*[model<"C3PO"']):Print %n:XmlDoc:Namespace = %old End Subroutine
- You can also use the XmlDoc function 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:
Subroutine disp(%l Object XmlNodelist) If %l:Count EQ 0 Then Print 'Nodelist empty; here is document:' %l:XmlDoc:Print Else ...
Request-Cancellation Errors
- XmlDoc has no request cancellation errors.