public function process_essay($xml, &$questions) {

        if ($this->getpath($xml, array('POOL', '#', 'QUESTION_ESSAY'), false, false)) {
            $essayquestions = $this->getpath($xml,
                    array('POOL', '#', 'QUESTION_ESSAY'), false, false);
        } else {
            return;
        }

        foreach ($essayquestions as $thisquestion) {

            $question = $this->process_common($thisquestion);

            $question->qtype = 'essay';

            $question->answer = '';
            $answer = $this->getpath($thisquestion,
                    array('#', 'ANSWER', 0, '#', 'TEXT', 0, '#'), '', true);
            $question->graderinfo = $this->cleaned_text_field($answer);
            $question->responsetemplate = $this->text_field('');
            $question->feedback = '';
            $question->responseformat = 'editor';
            $question->responserequired = 1;
            $question->responsefieldlines = 15;
            $question->attachments = 0;
            $question->attachmentsrequired = 0;
            $question->fraction = 0;

            $questions[] = $question;
        }
    }