Class VespaXMLFeedReader

  • All Implemented Interfaces:
    FeedReader

    public class VespaXMLFeedReader
    extends VespaXMLReader
    implements FeedReader
    XML parser for Vespa document XML. Parses an entire document "feed", which consists of a vespafeed element containing zero or more instances of documents, updates or removes. Standard usage is to create an Operation object and call read(Operation) until operation.getType() returns OperationType.INVALID. If you are looking to parse only a single document or update, use VespaXMLDocumentReader or VespaXMLUpdateReader respectively.
    • Method Detail

      • readAll

        public List<FeedOperation> readAll()
                                    throws Exception

        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.

        Returns:
        The list of all read operations.
        Throws:
        Exception