parentElement property

  1. @override
XmlElement? get parentElement
inherited

Return the first parent of this node that is of type XmlElement, or null if there is none.

Implementation

@override
XmlElement? get parentElement {
  for (var current = parent; current != null; current = current.parent) {
    if (current is XmlElement) {
      return current;
    }
  }
  return null;
}