Type (XmlDoc/XmlNode function)
Type returns the type of node of the head of the argument XPath result.
%xmlNodeType = nr:Type[( [xpath])] Throws XPathError
|%xmlNodeType||A declared enumeration object of type XmlNodeType (see below) to contain the returned value of Type.|
|nr||An XmlDoc or XmlNode, used as the context node for the xpath expression. If an XmlDoc, the Root node is the context node.|
|xpath||A Unicode string that is an Xpath expression that results in a nodelist. The head of the nodelist is the node to process. Any other nodes in the nodelist are ignored.
This is an optional argument whose default is a period (.), that is, the node referenced by the method object (nr). Prior to Sirius Mods Version 7.6, this argument is an EBCDIC string.
- PI (which stands for Processing Instruction)
The following example displays the string value of the type of the node pointed to by
toString above is optional: As with all enumerations, the ToString method implicitly converts an enumeration value to a character string whose value is the name of the enumeration value. For more information about methods available to all enumerations, see Common enumeration methods.
This list is not exhaustive: it does not include all the errors that are request cancelling.
- xpath expression is invalid.
- Result of xpath is empty.
- Insufficient free space exists in CCATEMP.
- For more information about using XPath expressions, see XPath.