Read method
Implementation
Future<bool> Read() async {
_isStarted = true;
if (_retrieved.isNotEmpty) {
_current = _retrieved.removeAt(0);
_parseAttributesAndNamespaces();
return true;
}
// _isFinished = !_events.moveNext();
if (!_isFinished) {
if (await _queue.hasNext) {
_retrieved = List.from(await _queue.next);
_current = _retrieved.removeAt(0);
_parseAttributesAndNamespaces();
} else {
_isFinished = true;
}
}
return !_isFinished;
}