protected function setScalarNodeCdata($name, $value)
    {
        // get tag
        $childDomElement = $this->getDomElement()->getElementsByTagName($name)->item(0);
        if ($childDomElement === null) {
            $childDomElement = $this->getDomElement()->ownerDocument->createElement($name);
            $this->getDomElement()->appendChild($childDomElement);
        }

        // upsert cdata
        $cdata = $this->getDomElement()->ownerDocument->createCDATASection($value);
        if ($childDomElement->hasChildNodes()) {
            // update cdata
            $childDomElement->replaceChild($cdata, $childDomElement->firstChild);
        } else {
            // insert cdata
            $childDomElement->appendChild($cdata);
        }

        return $this;
    }