parseBoolLiteral function

bool? parseBoolLiteral(
  1. XmlElement element,
  2. String tagName
)

Implementation

bool? parseBoolLiteral(XmlElement element, String tagName) {
  final v = findElementOrNull(element, tagName)?.innerText.toLowerCase().trim();
  if (v == null) {
    return null;
  }
  return ['yes', 'true'].contains(v);
}