Log in

View Full Version : Exporting certain database fields to XML


rustybones
08-28-2008, 08:22 AM
Hi guys,
so I'm in a bit of a pickle. My company needs all the threads in our forum exported out of the database into XML format.

Is there a SQL statement that will do this export these certain fields into a XML file:


Thread title
Thread creation date
Thread content (so the posts within this thread, plus the usernames and dates of said posts)


Any help here would be great! I've been searching for a tool of plugin for Vbulletin but no joy :(

Marco van Herwaarden
08-28-2008, 08:37 AM
Not that i know of. There might be a generic tool to export MySQL data to XML, but i have never seen a script for vB to do this. But i guess it would be easiest to write your own as your company also wants a specific XML to be generated.

rustybones
08-28-2008, 08:44 AM
Yeah I've been playing around with phpMyAdmin which can export stuff to XML. I'm hoping though someone might know of some SQL I can run to generate this stuff for me? Since I'm just a poor old little designer with little knowledge of mySQL :(

Opserty
08-28-2008, 08:44 AM
I think PHP has its own XMLWriter Functions (http://uk2.php.net/manual/en/ref.xmlwriter.php) (or you could see how vBulletin does its own). As Marco said it will probably be best for you to write your own script (or get someone to do it for you).