Line to XML Demux Pipeline Item

A line to XML demux pipeline item is a demupltiplexer that takes a character stream as input and generates a sequence of streams 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 functions:

public abstract void transformLine(String line, ContentHandler contentHandler);

public abstract boolean shouldChangePipeline();

The transformLine() method will be called each time a line is read in order for the script implementation to transform it as needed. 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 line. The additional shouldChangePipeline method should return true, when the boundaries of one result stream has been reached and another should be started. The transformBuffer() method is going to be called with a line parameter of null when the end of the input stream is reached.