public List<FeedOperation> readAll() throws Exception {
        List<FeedOperation> list = new ArrayList<>();
        while (true) {
            FeedOperation op = read();
            if (op.getType() == FeedOperation.Type.INVALID) {
                return list;
            } else {
                list.add(op);
            }
        }
    }
<p>Reads all operations from the XML stream and puts into a list. Note
that if the XML stream is large, this may cause out of memory errors, so
make sure to use this only with small streams.</p>

@return The list of all read operations.
document/src/main/java/com/yahoo/vespaxmlparser/VespaXMLFeedReader.java