[Sussex] Extracting data from MySQL into XML format

Richie Jarvis richie at helkit.com
Sun Jul 10 09:50:19 UTC 2005


Steve Dobson wrote:
> Hi guys
> 
> Does anyone know of a tool that will extract data from a MySQL
> database and wrap it in XML.  I need to provide a "select" query
> to reduce the data going into the XML file, and of course it needs
> to be command line callable so I can script it.
> 
> I also, of course, need a tool that takes the XML and inserts it
> into another database.
> 
> Ta
> Steve
Hi Steve,

I would suggest using adodb (http://adodb.sourceforge.net), which is a 
PHP database abstraction layer.  Then you can use this adodb add-on 
class (http://www.phpclasses.org/browse/package/1763.html) to extract in 
XML.

The good news is that you can then use the reverse procedure to import 
your data into your new database, as adodb supports most db's.

Hope that helps,

Richie




More information about the Sussex mailing list