getAttribute function
A utility method for getting an XML attribute with a default value.
Implementation
String? getAttribute(
List<XmlAttribute> attributes,
String name, {
String? def = '',
String? namespace,
}) {
for (XmlAttribute attribute in attributes) {
if (attribute.name.local == name) {
return attribute.value;
}
}
return def;
}