XmlElement.hasAttribute

bool hasAttribute(string qname) const @safe

Checks if an attribute with the given QName exists.

Parameters

qnameThe attribute name (QName).

Returns

true if the attribute exists, false otherwise.