protected function unmarshall(DOMElement $element)
    {
        if (($baseType = $this->getDOMElementAttributeAs($element, 'baseType', 'string')) !== null) {

            $value = $element->nodeValue;
            $baseTypeCst = BaseType::getConstantByName($baseType);
            
            // A little bit of cleaning...
            if ($baseTypeCst !== BaseType::STRING) {
                $value = trim($value);
            }
            
            $object = new BaseValue($baseTypeCst, Utils::stringToDatatype($value, $baseTypeCst));

            return $object;
        } else {
            $msg = "The mandatory attribute 'baseType' is missing from element '" . $element->localName . "'.";
            throw new UnmarshallingException($msg, $element);
        }
    }