public LineSplittingStrategy parseSplitter() throws XMLStreamException {
        int event = reader.next();
        boolean splitterDone = false;
        LineSplittingStrategy splitter = null;
        SplitterBuilder builder = new SplitterBuilder();
        while (!foundItemEnd(event, "splitter")){
            if (event == XMLStreamConstants.START_ELEMENT){
                //searches for the splitter tyep
                String elemName = reader.getLocalName();
                if ("singlelinesplitter".equals(elemName)){
                   builder.withSingleLineSplitter();
                   splitter = builder.build();
                   splitterDone = true;
                }else if ("multilinesplitter".equals(elemName)){
                   //get attributes
                   String prefix = reader.getAttributeValue(null, "prefix");
                   String suffix = reader.getAttributeValue(null, "suffix");
                   String nothingAfter = reader.getAttributeValue(null, "nothingAfter");
                   String notab = reader.getAttributeValue(null, "notab");
                   
                   boolean bnotab = notab != null ? Boolean.valueOf(notab) : false; 
                   boolean bnothingafter = nothingAfter != null ? Boolean.valueOf(nothingAfter) : false; 
                   
                   if (suffix == null) {
                       splitter = builder.multiLineWithPrefix(prefix, bnotab).build();
                   }else {
                       splitter = builder.multiLineWithPrefix(prefix, suffix, bnotab, bnothingafter).build();
                   }
                   splitterDone = true;
                }else {
                    throw new XMLStreamException("Invalid element found instead of a splitter : " + elemName);
                }
            }
            event = reader.next();
        }
        if (!splitterDone) {
            throw new XMLStreamException("Did not find a splitter inside a splitter element");
        }
        return splitter;
    }