firstElementChild property Null safety

XmlElement? firstElementChild

Return the first child XmlElement, or null if there are none.

Implementation

@override
XmlElement? get firstElementChild {
  for (final node in children) {
    if (node is XmlElement) {
      return node;
    }
  }
  return null;
}