Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : GET-ATTRIBUTE( ) method
 

GET-ATTRIBUTE( ) method

Returns the value of the specified attribute of an element referred to by an XML node reference.
Return type: LOGICAL
Applies to: X-noderef object handle

Syntax

GET-ATTRIBUTE ( name )
name
The attribute name whose value is desired. Attribute names are defined within the element tag. If using a DTD, you can define attributes with the "IMPLIED" property and those attributes will appear in the DOM structure.
If hNoderef is an element node with various attributes, and anames and bname are character program variables, the following example demonstrates listing all the attributes of the node:
anames = hNoderef:ATTRIBUTE-NAMES.
REPEAT jx = 1 TO NUM-ENTRIES(anames):
bname = ENTRY(jx, anames).
MESSAGE "attribute-name is" bname "value is"
    hNoderef:GET-ATTRIBUTE(bname).
END.