org.w3c.dom.Element.hasAttribute
method
public hasAttribute(name as String) as Boolean
Description

Indicates whether an attribute exists by name.

Parameters
  • name Attribute qualified name.
Returns

True when the attribute exists.

Example
print(element.hasAttribute("id"))