Skip to main content

DoxygenXmlParser.hasAttribute() method

Determines whether the specified attribute exists on the given XML element.

Signature

hasAttribute(element: object, name: string): boolean;

Parameters

Parameter

Type

Description

element

object

The XML element to inspect

name

string

The name of the attribute to check for

Returns

boolean

True if the attribute exists; otherwise, false

Remarks

This method checks for the presence of an attribute within the ':@' property of the XML element, which is the convention used by the XML parser for storing attributes. It returns true if the attribute is found, otherwise false.