parseBoolLiteral function
Finds the first element with the given tagName
in the given element
and
parses it as a boolean
Implementation
bool parseBoolLiteral(XmlElement element, String tagName) {
final v =
element.findElements(tagName).firstOrNull?.innerText.toLowerCase().trim();
if (v == null) return false;
return ['yes', 'true'].contains(v);
}