private function createNode($nodeName, $nodeValue, $cdata = false)
    {
        $node = $this->createElement($nodeName);
        if($cdata){
            $text = $this->createCDATASection($nodeValue);
        } else {
            $text = $this->createTextNode($nodeValue);
        }

        $node->appendChild($text);
        return $node;

    }