Whether this element has an attribute with the given name and optional namespaceUri.
name
namespaceUri
bool hasAttribute(String name, {String? namespaceUri}) => getAttributeNode(name, namespaceUri: namespaceUri) != null;