public static function setDOMElementValue(DOMElement $element, $value)
    {
        switch (gettype($value)) {
            case 'boolean':
                $element->nodeValue = ($value === true) ? 'true' : 'false';
            break;

            default:
                $element->nodeValue = $value;
            break;
        }
    }