A line to XML pipeline item takes a character stream as input and generates a stream of SAX events as output. In order to facilitate a custom transform of the character stream, the user has to specify in a JSR-223 compliant script, the implementation of the following function:
public abstract void transformLine(String line, ContentHandler contentHandler);
This will be called once for each line being read from the source character stream. When
the source character stream is complete, this function will be called once more with a
line
parameter of null
. The implementor of this method is
supposed to generate appropriate content handler calls to create the SAX events that
will generate the XML for the transformation of the incoming character stream.