getProp function

XmlElement? getProp(
  1. XmlElement? xml,
  2. String name
)

Implementation

XmlElement? getProp(XmlElement? xml, String name) {
  if (xml == null) return null;
  final result = xml.findElements(name);
  return result.isNotEmpty ? result.first : null;
}