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.nodeType)) {
throw XmlNodeTypeException(
'Got ${node.nodeType}, but expected one of ${types.join(', ')}',
node: node,
types: types,
);
}
}