XmlDoc (XmlNode function)

From m204wiki
Jump to navigation Jump to search

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