5 18 10 CHECK

LANSA Integrator

5.18.10 CHECK

The CHECK command checks for the existence of a node or attribute. Also can test if a node or attribute has a particular value.

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

CHECK

NODE

*ROOT

Mandatory.

*CURRENT

 

value

 

ATTRIBUTE

value

Optional.

VALUE

value

Optional.

 

If the node does not exist in the DOM tree, then a response status of NOT_EXIST will be returned

If no VALUE or ATTRIBUTE keyword are present a response status of EXIST will be returned.

If no ATTRIBUTE keyword is present and a VALUE keyword is present, a case insensitive comparison is done between the node value and the VALUE keyword value. If they are equal then a response status of EQUAL is returned, else a NOT_EQUAL is returned.

If no VALUE keyword is present and ATTRIBUTE keyword is present, then the existence of the attribute is done and an EXIST or NOT_EXIST response status is returned.

If both a VALUE and ATTRIBUTE keyword are present a value comparison of the attribute value is done and an EQUAL or NOT_EQUAL response status is returned.