...

View Full Version : XML loaed from a database?



Evlich
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.
~evlich

Jeewhizz
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 :)

Jee

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.

SYP}{ER
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:

<db_name>
&nbsp;&nbsp;<table_name>
&nbsp;&nbsp;&nbsp;&nbsp;<field_name>Data</field_name>
&nbsp;&nbsp;</table_name>
</db_name>

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum