Interface XMLStreamProcessor

All Known Implementing Classes:
CollectionPopulatingXMLStreamProcessor

public interface XMLStreamProcessor
XMLStreamProcessor instances are provided to StreamingXMLReader and will receive all of the Fragments generated by the reader.
  • Method Details

    • process

      void process​(Fragment fragment)
      Accept Fragment objects from the StreamingXMLReader. The reader will call this method as each Fragment is extracted from the XML file
      Parameters:
      fragment - Wrapper object that contains a DocumentFragment and an XMLByteLocation object
    • setBytesTotal

      void setBytesTotal​(long bytesTotal)
      StreamingXMLReader will set the total number of bytes in the file before it begins parsing the file.

      You can use this along with the byte offsets provided in the XMLByteLocation objects to keep track of the parsing progress.

      Parameters:
      bytesTotal - Total bytes in the file being processed