CodeIgniter Forums
calling xml file in Ajax - 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: calling xml file in Ajax (/showthread.php?tid=57464)



calling xml file in Ajax - El Forum - 03-16-2013

[eluser]Noah_Igniter[/eluser]
Hi All

i have two xml files. i need to use them in loding data. here i strucked where i need place the two xml files. that wheter in views folder, or out side of the Application folder?

and how i called the two files in ajax. because, i am loading data from xml files through ajax calling.

Code:
$.ajax({
  type: "GET",
  url: "configData.xml?file="+dateTime.getTime(),
  dataType: "xml",
  success: function(configXML) {

something.....

}

configData.xml, is my one of the xml file name.


thank you


calling xml file in Ajax - El Forum - 03-16-2013

[eluser]TheFuzzy0ne[/eluser]
You can echo the XML from your controller, or put it into a view. It's up to you. Just be sure that you disable error reporting and the profiler if they're enabled.


calling xml file in Ajax - El Forum - 03-16-2013

[eluser]Noah_Igniter[/eluser]
i am not clear. elaborate your answer