AttributeExtension extension
- on
-
- XmlStartElementEvent
Methods
-
attribute<
T> (String attributeName, {Converter< T> ? convert}) → Future<T> -
Extracts an attribute by name. Throws
MissingAttribute
if not found. -
hasAttribute(
String attributeName) → Future< bool> -
Checks for the presence of an attribute. Returns
true
if found. -
namedAttribute<
T> (String attributeName, {Converter< T> ? convert, dynamic isRequired = false, T? defaultValue}) → Future<T?> - Extracts an attribute from an element, converting it into a desired type.
-
optionalAttribute<
T> (String attributeName, {Converter< T> ? convert}) → Future<T?> -
Extracts an attribute by name. Returns
null
if not found.