getAttribute Method

Returns a node attribute.

getAttribute(attName);

 

Parameter

Description

attName

The attribute name of the attribute to retrieve

Return Value

Returns a string value of the given attribute name. If the attribute does not exist then the return value is undefined.

Remarks

If the requested attribute is part of the node’s GIS information, the following format must be applied:  

var val = node.getAttribute("GIS:myAttrib");

The attribute name/value must follow the rules of the XML attribute name/value.