Re: [xsl] MySQL XML retrieval

Subject: Re: [xsl] MySQL XML retrieval
From: Ben Trafford <ben@xxxxxxxxxxx>
Date: Tue, 02 Dec 2003 06:42:27 -0500

At 04:50 PM 12/2/2003 +0530, karthikeyan.balasubramanian wrote:
  Just wondering if we can get data in mysql
as an xml and use xslt to format it.

  Anybody who have done this can chip
in their input so that I can get enlightened

I'm in the middle of doing this, myself.


Assuming you're using Linux, if you go to the command line and type:

mysqldump -X --password='YOUR_PASSWORD' DATABASE_NAME >XML_FILE.xml

...you'll get an XML data file in the format:

        <database name="DATABASE_NAME">
                <table name="TABLE_NAME>
                        <row>
                                <field name="FIELD_NAME">FIELD_DATA</field>
                                ...more fields...
                        </row>
                        ...more rows...
                </table>
                ...more tables...
        </database>

I have some XSLT files designed to strip out data from that format. Drop me a private email if you'd like them, and I'll ship them off. I haven't done any work to format them yet.


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread