SapAuthor Posted July 6, 2009 Share Posted July 6, 2009 I'm starting to learn AJAX, and i see there are various ways you can gather data (mainly a html snippet, xml, or JASOC or something like that). I see how people can sort through data that's in an XML document fine, but I was curious what is the normal way to go about AJAX and xml (using php). What i mean is, do you use PHP to write a string variable that is in the XML format and save that, then access the data using AJAX live? Or when you have content that will be sorted from your MySQL query, you don't really use that, and instead use html snippet? My application will be a fast viewer for my comic site (over 2000 comics). In my mind the page would prompt using AJAX a php page to build the xml document that has the comic(s) data (some dates have 2 comics), then when it's finished will load the data in the xml document containing the comic(s) data and display it to the user. Basically...if someone could tell me if you go about writing a new xml document THEN accessing it, or if you somehow in PHP Make a 'temporary' xml document that isnt saved anywhere and access that, or if you just only use xml data when you have a finite data set to search through. Thanks! :3 Quote Link to comment Share on other sites More sharing options...
SapAuthor Posted July 6, 2009 Author Share Posted July 6, 2009 after some more searching i found the answer, that php can "echo" an xml document back to the Ajax script and be used that way. ^^' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.