protected function getRootNode($rootElementName = 'data')
    {
        $xml = new DOMDocument('1.0', 'UTF-8');
        $xml->preserveWhiteSpace = false;
        $xml->formatOutput = true;
        $rootElement = $xml->createElement($rootElementName);
        $xml->appendChild($rootElement);

        return $rootElement;
    }
protected function getRootNode($rootElementName = 'data')
    {
        $xml = new DOMDocument('1.0', 'UTF-8');
        $xml->preserveWhiteSpace = false;
        $xml->formatOutput = true;
        $rootElement = $xml->createElement($rootElementName);
        $xml->appendChild($rootElement);

        return $rootElement;
    }
protected function getRootNode ( $ rootElementName = 'data' ) { $ xml = new DOMDocument ( '1.0' , 'UTF-8' ) ; $ xml -> preserveWhiteSpace = false ; $ xml -> formatOutput = true ; $ rootElement = $ xml -> createElement ( $ rootElementName ) ; $ xml -> appendChild ( $ rootElement ) ; return $ rootElement ; }
Create a DOMDocument and get the root DOMNode using a root element name

@param string $rootElementName The Root Element Name

@return DOMNode The root DOMNode
Create a DOMDocument and get the root DOMNode using a root element name