checkNoParent static method

void checkNoParent(
  1. XmlParentable node
)

Ensure that node has no parent.

Implementation

static void checkNoParent(XmlParentable node) {
  if (node.parent != null) {
    throw XmlParentException('Node already has a parent, copy or remove it first: $node');
  }
}