checkValidType method

void checkValidType (
  1. XmlNode node,
  2. Iterable<XmlNodeType> types
)

Ensure that node is of one of the provided types.

Implementation

static void checkValidType(XmlNode node, Iterable<XmlNodeType> types) {
  if (!types.contains(node.nodeType)) {
    throw XmlNodeTypeException('Expected node of type: $types');
  }
}