root property

  1. @override
XmlNode get root
inherited

Return the root of the tree in which this node is found, whether that's a document or another element.

Implementation

@override
XmlNode get root {
  XmlNode current = this;
  while (current.parent != null) {
    current = current.parent!;
  }
  return current;
}