src/Environaut/Config/Reader/Dom/DomElement.php
protected function getLiteralValue($element)
    {
        $value = $element->getValue();
        $trimmed_value = trim($value);

        $preserve_whitespace = $element->getAttributeValue('space', 'default') === 'preserve';
        $literalize_value = self::literalize($element->getAttributeValue('literalize')) !== false;

        if ($literalize_value) {
            if ($preserve_whitespace && ($trimmed_value === '' || $value !== $trimmed_value)) {
                $value = $value;
            } else {
                $value = self::literalize($trimmed_value);
            }
        } elseif (!$preserve_whitespace) {
            $value = $trimmed_value;
            if ($value === '') {
                $value = null;
            }
        }

        return $value;
    }
protected function getLiteralValue($element)
    {
        $value = $element->getValue();
        $trimmed_value = trim($value);

        $preserve_whitespace = $element->getAttributeValue('space', 'default') === 'preserve';
        $literalize_value = self::literalize($element->getAttributeValue('literalize')) !== false;

        if ($literalize_value) {
            if ($preserve_whitespace && ($trimmed_value === '' || $value !== $trimmed_value)) {
                $value = $value;
            } else {
                $value = self::literalize($trimmed_value);
            }
        } elseif (!$preserve_whitespace) {
            $value = $trimmed_value;
            if ($value === '') {
                $value = null;
            }
        }

        return $value;
    }
Depending on the values of the 'literalize' and 'space' attributes of the element
the transformed or literal value of the value is returned

@param \DOMNode $element element to get a value for

@return mixed literalized and/or whitespace preserved value or null if value is empty