View Full Version : XML loaed from a database?

07-09-2002, 12:43 AM
Hello, if i stored all my XML in a MySQL database, would there be a way to get it so that the user could download it so that it could be parsed on the client side? Thanks a lot.

07-09-2002, 01:52 AM
You just retrieve it and echo it to the page. At the client end, all they would receive it XML, and no PHP/MySQL :)


Alex Vincent
07-11-2002, 09:42 PM
Don't forget to set the content-type appropriately! PHP defaults to an output of text/html.

07-11-2002, 11:09 PM
The new phpMyAdmin (2.3.0-rc2) lets you export your database as XML :) If you weren't using your database for dynamic pages (the database can't be changed online by anyone but the admin etc) then you could just make any db changes, export as XML, and upload.

The XML export isn't anything fancy, though. It formats it like so:


Which can easily be done using a pretty simple PHP script.