checkParent static method
Ensure that node
has a parent and returns that node.
Implementation
static XmlNode checkParent(XmlParentBase node) {
final parent = node.parent;
if (parent == null) {
throw XmlParentException('Node has no parent', node: node);
}
return parent;
}