protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        
        foreach ($component->getShufflingGroups() as $shufflingGroup) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($shufflingGroup);
            $element->appendChild($marshaller->marshall($shufflingGroup));
        }

        return $element;
    }