public LogDescriptor parseDescriptor() throws XMLStreamException{
        int event = reader.next();
        boolean splitterDone = false;
        boolean parserDone = false;
        LineSplittingStrategy splitter = null;
        LogItemParser parser = null;
        while(!foundItemEnd(event,"logDescriptor")){
            if (event == XMLStreamConstants.START_ELEMENT){
                String elemName = reader.getLocalName();
                if ("splitter".equals(elemName)){
                    splitter = parseSplitter();
                    if (splitter != null){
                        splitterDone = true;
                    }
                }else if ("parser".equals(elemName)){
                    parser = parseParser();
                    if (parser != null){
                        parserDone = true;
                    }
                }else {
                    throw new XMLStreamException("Found invalid element when searching for splitter or parser : " + elemName);
                }
            }
            event = reader.next();
        }
        if (!splitterDone || !parserDone){
            throw new XMLStreamException("Log descriptor incomplete");
        }
        
        BaseLogDescriptor desc = new BaseLogDescriptor();
        desc.setParser(parser);
        desc.setSplitter(splitter);
        return desc;
    }