I am trying to write what should be a simple API using CakePHP's REST with XML.
The code I have is very basic, still not working. I realize it is very likely a simple thing like file extension or path to file, but I am very new to REST and limited when using XML. any help would be greatly appreciated. Here is my error XML Parsing Error: mismatched tag. Expected: </div>. Location: http://member.ozonefit.com/users/add.xml Line Number 62, Column 4: </body> ----------^ Here are the files Routes Router::mapResources('users'); Router::parseExtensions('xml'); Users Controller var $components = array('RequestHandler'); function add(){ $this->layout = 'default'; if( $this->RequestHandler->isXML() ) { configure::write('debug',0); $users['firstname'] = 'firstname'; $users['lastname'] = 'lastname'; $this->set(compact('users')); } } layouts->xml->default.xml <?php echo $this->Xml->header(array('version'=>'1.1')); layouts->users->xml add.xml <?php echo $this->Xml->serialize($users); -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
