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

        $this->setDOMElementAttribute($element, 'select', $component->getSelect());
        $this->setDOMElementAttribute($element, 'withReplacement', $component->isWithReplacement());
        
        if (($xml = $component->getXml()) !== null) {
            $selectionElt = $xml->documentElement->cloneNode(true);
            
            Utils::importChildNodes($selectionElt, $element);
            Utils::importAttributes($selectionElt, $element);
        }

        return $element;
    }