consume method

Future<void> consume(
  1. Matcher<XmlEvent> match
)

Skip all events while the matcher returns true.

Implementation

Future<void> consume(Matcher match) async {
  while (await hasNext) {
    final p = await peek;
    if (!match(p)) break;
    _log.finest(p);
    await next;
  }
}