src/MVC/View.php
function XML($data, $root_name = 'root')
    {
        $this->set['load_layer'] = false;
        $this->delegate->getResponse()->setContentType('xml');
        echo Array2XML::createXML($root_name, $data)->saveXML();
    }
function XML($data, $root_name = 'root')
    {
        $this->set['load_layer'] = false;
        $this->delegate->getResponse()->setContentType('xml');
        echo Array2XML::createXML($root_name, $data)->saveXML();
    }
输出XML

@param $data
@param string $root_name
@throws Exception