public function addOptionXML($root, $name, $xmlString)
    {
        if (isset($xmlString)) {
            $elem = $this->dom->createElement($name);
            $xmlDoc = new \DOMDocument();
            $xmlDoc->loadXML($xmlString);
            // http://stackoverflow.com/questions/5783716/php-xml-dom-uncaught-exception-domexception-with-message-wrong-document-error
            $elem->appendChild($this->dom->importNode($xmlDoc->documentElement, true));
            $root->appendChild($elem);
        }
    }