Page Caching Custom XML - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Page Caching Custom XML (/showthread.php?tid=17090) |
Page Caching Custom XML - El Forum - 03-25-2009 [eluser]Unknown[/eluser] I am attempting to page cache a large custom XML output from data. I pass the data result sets to the View from the Controller. The View contains the XML format, Element tags, etc., When I run this without page caching, everything is fine and my Javascript code is able to process the XML. The XML output in the browser looks normal When I try to use page caching (ie., $this->output->cache(3600); ) in the Controller, my XML output has changed drastically. All XML Element Tags are gone. Anything wrapped as CDATA doesn't show up. Any thoughts? Controller Function: function gps() { $this->output->cache(3600); header('Content-Type: application/xml'); $this->load->model('xml/instrument_finder', 'instrumentfinder', TRUE); $page["instruments"] = $this->instrumentfinder->get_gps(); $this->load->view('xml/instruments_list', $page); } View: <instruments> <?php foreach($instruments->result() as $row): <instrument> <station_code><![CDATA[<?=$row->pnum ?>]]></station_code><station_type><![CDATA[<?=$row->stntype ?>]]></station_type><name><![CDATA[<?=$row->stnnickname ?>]]></name><station_date><?=substr($row->stninsdate, 0, -9)?></station_date><om_region><![CDATA[<?=$row->region2?>]]></om_region><status><![CDATA[<?=$row->stnstatus?>]]></status><city><![CDATA[<?=$row->sitecity?>]]></city><state><![CDATA[<?=$row->sitestate?>]]></state><elevation><![CDATA[<?=$row->elev?>]]></elevation><latitude><![CDATA[<?=$row->lat?>]]></latitude><longitude><![CDATA[<?=$row->lon?>]]></longitude><install_type><![CDATA[<?=$row->montype?>]]></install_type><install_date><?=$row->moninsdate?></install_date><study><![CDATA[<?=$row->localegroup?>]]></study><geology><![CDATA[<?=$row->geolsumm?>]]></geology><comments><![CDATA[<?=$row->addinfo?>]]></comments><project><![CDATA[<?=$row->project?>]]></project><comms><?=$comms?></comms><netrs><?=$netrs?></netrs><dataflow><?=$dataflow?></dataflow><archive><?=$archive?></archive><photohtml><?= $photoHtml ?></photohtml> </instrument> <?php endforeach; ?> </instruments> Page Caching Custom XML - El Forum - 01-22-2010 [eluser]searain[/eluser] Hello do you have found the solution? I have the same problem. The xml tags are gone in firefox but displayed in IE and in the source code, the xml tags is there. |