om.DomNode.getAttributesCount

Returns the number of attributes in the DOM node.

Syntax

getAttributesCount()
  RETURNS INTEGER

Usage

The getAttributesCount() method returns the number of attributes defined in the current node.

This method is typically used to scan all the attributes of a node by position, with the getAttributeName() and getAttributeValue() methods.

Example

FUNCTION display_attribute_names(node om.DomNode)
    DEFINE index, count INTEGER
    LET count = node.getAttributesCount()
    FOR index = 1 TO count
        DISPLAY node.getAttributeName(index)
    END FOR
END FUNCTION