extractXmlStringAttribute function

String? extractXmlStringAttribute(
  1. XmlElement elem,
  2. String name
)

Implementation

String? extractXmlStringAttribute(XmlElement elem, String name) {
  return elem.attributes
      .firstWhereOrNull((e) => e.name.qualified == name)
      ?.value;
}