protected function unmarshall(DOMElement $element)
    {
        // Retrieve XML content as a string.
        $frag = $element->ownerDocument->createDocumentFragment();
        $element = $element->cloneNode(true);
        $frag->appendChild($element);
        $xmlString = $frag->ownerDocument->saveXML($frag);
        
        // select is a mandatory value, retrieve it first.
        if (($value = $this->getDOMElementAttributeAs($element, 'select', 'integer')) !== null) {
            $withReplacement = false;
            
            if (($withReplacementValue = $this->getDOMElementAttributeAs($element, 'withReplacement', 'boolean')) !== null) {
                $withReplacement = $withReplacementValue;
            }
            
            $object = new Selection($value, $withReplacement, $xmlString);
            
        } else {
            $msg = "The mandatory attribute 'select' is missing.";
            throw new UnmarshallingException($msg, $element);
        }

        return $object;
    }