how work with xml class in cakePHP 1.3?
I have this code:
function xml_test()
{
echo $this->Xml->header(array('version'=>'1.1'));
echo $this->Xml->serialize($data, array('format' => 'tags');
}
and get error:
Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'header' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 684]
Why, whats wrong?
Query: header
This is probably because you haven’t included the Xml helper in your controller, e.g.