public function fromArray($array, $rootKey = 'data', $charset = null)
    {
        $rootNode = $this->getRootNode($rootKey);
        $this->arrayToDOM($array, $rootNode, $charset, false);

        return $rootNode->ownerDocument->saveXML();
    }