Class StaxExtractingProcessor.LimitedStaxHandler

  • Enclosing class:
    StaxExtractingProcessor

    public static class StaxExtractingProcessor.LimitedStaxHandler
    extends java.lang.Object
    A base implementation to be extended to handle the elements within the matched elements. For example a <person> that contains <firstname> and <lastname> elements that need to be combined into a single value. "Bob Smith" The default implementation is a very thin wrapper on a string buffer and will simply collect all characters. All implementations should produce their results via the toString method which merely reflects the value of the accumulator. The most common use will be to maintain flags turning on/off capture of a selected number of sub elements (i.e. just the names but not the age or sex from a <person> element.
    • Field Detail

      • accumulator

        protected final java.lang.StringBuilder accumulator
    • Method Detail

      • onCharacters

        protected void onCharacters​(org.codehaus.stax2.XMLStreamReader2 xmlStreamReader)
      • onStartElement

        protected void onStartElement​(org.codehaus.stax2.XMLStreamReader2 xmlStreamReader)
      • onEndElement

        protected void onEndElement​(org.codehaus.stax2.XMLStreamReader2 xmlStreamReader)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • reset

        public void reset()