CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   XML loaed from a database? (http://www.codingforums.com/showthread.php?t=1624)

Evlich 07-08-2002 11:43 PM

XML loaed from a database?
 
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 12: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 08:42 PM

Don't forget to set the content-type appropriately! PHP defaults to an output of text/html.

SYP}{ER 07-11-2002 10: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.


All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.