protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());
        $this->setDOMElementAttribute($element, 'required', $component->isRequired());
        $this->setDOMElementAttribute($element, 'fixed', $component->isFixed());

        foreach ($component->getPreConditions() as $preCondition) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($preCondition);
            $element->appendChild($marshaller->marshall($preCondition));
        }

        foreach ($component->getBranchRules() as $branchRule) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($branchRule);
            $element->appendChild($marshaller->marshall($branchRule));
        }

        if ($component->getItemSessionControl() != null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getItemSessionControl());
            $element->appendChild($marshaller->marshall($component->getItemSessionControl()));
        }

        if ($component->getTimeLimits() != null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getTimeLimits());
            $element->appendChild($marshaller->marshall($component->getTimeLimits()));
        }

        return $element;
    }