checkHasChildren static method

void checkHasChildren(
  1. XmlNode node
)

Ensure that node can have children.

Implementation

static void checkHasChildren(XmlNode node) {
  if (node is! XmlHasChildren) {
    throw XmlNodeTypeException(
      '${node.nodeType} cannot have child nodes.',
      node: node,
      types: const [],
    );
  }
}