parentElement property

XmlElement parentElement

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

Implementation

XmlElement get parentElement {
  var current = parent;
  while (current != null && current is! XmlElement) {
    current = current.parent;
  }
  return current;
}