GetType Method (XDATA)


9.8A

 

The GetType method returns the node type of the current node. The method uses the following format:

 

[label]

{object}.GetType

[GIVING {return}]

 

Where:

label
Optional. A Program Execution Label.
object
Required. An XDATA object.
return
Optional. A Numeric Variable that receives the node type of the current node.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The ZERO flag is set if the {return} value is zero.

  2. The OVER flag is set TRUE if the type value is too large to be stored in the {return} numeric variable.

  3. The EOS flag is always set FALSE.

  4. The expected node type values are defined as follows:

  5.  

    Type

    Value

    DOM_ELEMENT_NODE

    1

    DOM_ATTRIBUTE_NODE

    2

    DOM_TEXT_NODE

    3

    DOM_CDATA_SECTION_NODE

    4

    DOM_ENTITY_REFERENCE_NODE

    5

    DOM_ENTITY_NODE

    6

    DOM_PROCESSING_INSTRUCTION_NODE

    7

    DOM_COMMENT_NODE

    8

    DOM_DOCUMENT_NODE

    9

    DOM_DOCUMENT_TYPE_NODE

    10

    DOM_DOCUMENT_FRAGMENT_NODE

    11

    DOM_NOTATION_NODE

    12

 

 

See Also: XDATA, XDATA Methods, Method Syntax



PL/B Language Reference GetText Method (XDATA) LoadJson Method (XDATA)