Class CSVTransformer

All Implemented Interfaces:
Poolable, Recyclable, Component, LogEnabled, SitemapModelComponent, Transformer, XMLConsumer, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler

public class CSVTransformer extends AbstractTransformer
This transformer is in charge to transform XML to CSV format with escaped and sanitized cell values.
XML input should respect the following format:
     <csv>
          <row>
              <cell>Header 1</cell>
              <cell>Header 2</cell>
              <cell>Header 3</cell>
              <cell>Header 4</cell>
          </row>
          <row>
              <cell>A cell value with "double quotes"</cell>
              <cell></cell>
              <cell>=1+2</cell>
              <cell doNotSanitize="true">=1+2</cell>
          </row>
     </csv>
 
Use do 'doNotSanitize' attribute on tag <cell> to skip sanitization of the cell.
With preceded example, ouput will be:
   "Header 1";"Header 2";"Header 3";"Header 4";
   "A cell value with ""double quotes""";;"'=1+2";"=1+2"