Why would someone tend to use XML / XSLT to transform a bunch of XML data into HTML (to drop into a div) via an AJAX call, vs. using PHP to convert data from a SQL database into HTML, and load that instead into a div via an AJAX call?
Wouldn't these two mechanisms be roughly equivalent?
When would one be preferred over the other and why?
I'm guessing is that the time to use XML / XSLT over PHP / MySQL would be if there was other data that needed to be loaded into javascript variables for client-side processing. But even though it seems that the HTML brought over by AJAX could be parsed as part of the DOM by JavaScript.
Hope my questions are clear enough.
I'm new to XML / XSLT, just starting to learn it, so any insights here would be appreciated. Thanks in advance.
Wouldn't these two mechanisms be roughly equivalent?
When would one be preferred over the other and why?
I'm guessing is that the time to use XML / XSLT over PHP / MySQL would be if there was other data that needed to be loaded into javascript variables for client-side processing. But even though it seems that the HTML brought over by AJAX could be parsed as part of the DOM by JavaScript.
Hope my questions are clear enough.
I'm new to XML / XSLT, just starting to learn it, so any insights here would be appreciated. Thanks in advance.






