subQuestion.setOptionNumber(new Integer(optionNumber));
    private SubQuestion getOptions(QuestionElement questionElement, SubQuestion subQuestion)            throws ParseQuestionException {        List<LabelValueBean> optionsAuxList = new ArrayList<LabelValueBean>();        int optionNumber = 0;        // int questions = 0;        QuestionOption questionOption = new QuestionOption();        List<QuestionOption> optionList = new ArrayList<QuestionOption>();        for (Element element : questionElement.getListOptions()) {            String tag = element.getQName();            Attributes atts = element.getAttributes();            if (tag.startsWith("render_")) {                if (tag.equals("render_fib")) {                    RenderFIB renderFIB = new RenderFIB();                    renderFIB.setFibtype(atts.getValue("fibtype"));                    if (atts.getIndex("rows") != -1)                        renderFIB.setRows(new Integer(atts.getValue("rows")));                    if (atts.getIndex("columns") != -1)                        renderFIB.setColumns(new Integer(atts.getValue("columns")));                    if (atts.getIndex("maxchars") != -1)                        renderFIB.setMaxchars(new Integer(atts.getValue("maxchars")));                    subQuestion.getQuestionType().setRender(renderFIB);                } else if (tag.equals("render_choice")) {                    RenderChoise renderChoise = new RenderChoise();                    renderChoise.setShuffle(atts.getValue("shuffle"));                    subQuestion.getQuestionType().setRender(renderChoise);                } else                    throw new ParseQuestionException(tag, true);            } else if ((tag.startsWith("mat") && !tag.equals("material")) || tag.startsWith("response_")) {                if ((tag.equals("response_lid")) || (tag.equals("response_str"))                        || (tag.equals("response_num"))) {                    questionElement.setResponseId(atts.getValue("ident"));                    // questions++;                    // if (questions > 1)                    // throw new ParseQuestionException("O sistema ainda no                    // suporta perguntas com alneas.");                    subQuestion.setQuestionType(new QuestionType(tag));                    if (atts.getIndex("rcardinality") != -1) {                        if (atts.getValue("rcardinality").equals("Ordered"))                            throw new ParseQuestionException(tag, "rcardinality=Ordered");                        subQuestion.getQuestionType().setCardinalityType(                                new CardinalityType(atts.getValue("rcardinality")));                    }                } else if ((tag.equals("response_label")) || (tag.equals("response_na"))) {                    if (questionOption.getOptionId() == null) {                        questionOption.setOptionId(atts.getValue("ident"));                    } else {                        if (optionsAuxList.size() != 0) {                            questionOption.setOptionContent(optionsAuxList);                            optionList.add(questionOption);                        }                        questionOption = new QuestionOption(atts.getValue("ident"));                        optionsAuxList = new ArrayList<LabelValueBean>();                    }                    if (tag.equals("response_na"))                        questionOption.setEmptyResponse(true);                    optionsAuxList.add(new LabelValueBean("response_label", atts.getValue("ident")));                    optionNumber++;                } else if ((tag.equals("mattext"))) {                    String textType = "text/plain";                    if (atts.getIndex("texttype") != -1) {                        textType = atts.getValue("texttype");                    }                    optionsAuxList.add(new LabelValueBean(textType, element.getValue()));                } else if ((tag.equals("matimage"))) {                    if (atts.getIndex("label") != -1)                        optionsAuxList.add(new LabelValueBean("image_label", atts.getValue("label")));                    if (atts.getIndex("uri") != -1)                        throw new ParseQuestionException(tag, "uri");                    optionsAuxList                            .add(new LabelValueBean(atts.getValue("imagtype"), element.getValue()));                } else                    throw new ParseQuestionException(tag, true);            } else if ((tag.equals("flow"))) {                optionsAuxList.add(new LabelValueBean("flow", ""));            }        }        if (questionOption != null && optionsAuxList.size() != 0) {            questionOption.setOptionContent(optionsAuxList);            optionList.add(questionOption);        }        // subQuestion.setOptionNumber(new Integer(optionNumber));        subQuestion.setOptions(optionList);        return subQuestion;    }