Module jonix.xml

Interface XmlChunker.Listener

Enclosing class:
XmlChunker
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface XmlChunker.Listener
An interface that the user of XmlChunker must implement in order to get the 'chunks' extracted from the XML source
Author:
Zach Melamed
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onChunk(Element element)
    Fired with an in-memory DOM representation of an XML sub-tree positioned at the target depth
    default void
    onPreTargetStart(int depth, StartElement element)
    Fired for elements in the XML source positioned at a level lower than the target depth, giving the user a chance to look at their name and attributes
  • Method Details

    • onPreTargetStart

      default void onPreTargetStart(int depth, StartElement element)
      Fired for elements in the XML source positioned at a level lower than the target depth, giving the user a chance to look at their name and attributes
      Parameters:
      depth - level at which the element is positioned
      element - the element itself (this is NOT a DOM element)
    • onChunk

      boolean onChunk(Element element)
      Fired with an in-memory DOM representation of an XML sub-tree positioned at the target depth
      Returns:
      whether or not to continue to the next chunk (i.e. false means break the parsing)