checkValidType static method
Ensure that node is of one of the provided types.
Implementation
static void checkValidType(XmlNode node, Iterable<XmlNodeType> types) {
if (!types.contains(node.accept(const XmlVisitorNodeType()))) {
throw XmlNodeTypeException('Expected node of type: ${types.join(', ')}');
}
}