DoxygenXmlParser.getAttributeStringValue() method
Retrieves the value of a named attribute as a string.
Signature
getAttributeStringValue(element: object, name: string): string;
Parameters
Parameter |
Type |
Description |
---|---|---|
element |
object |
The XML element containing the attribute |
name |
string |
The name of the attribute to retrieve |
Returns
string
The attribute value as a string
Exceptions
If the attribute does not exist
Remarks
This method checks whether the specified attribute exists on the XML element and returns its value as a string. If the attribute value is originally a number (as the XML parser may return numeric strings as numbers), it is converted to a string to maintain consistency with the DTD specification. If the attribute is missing, an error is thrown to indicate the absence.