Re: [xsl] MySQL XML retrieval

Subject: Re: [xsl] MySQL XML retrieval
From: Jim Melton <jim.melton@xxxxxxx>
Date: Tue, 02 Dec 2003 08:53:30 -0700
I think that it's appropriate to observe here that a new part of the SQL standard, called SQL/XML (ISO/IEC 9075-14) addresses many issues of XMl in an SQL context, including the one indicated in Ben's message below. The first edition of SQL/XML will become a standard within the next week and the second edition is already being developed.

It appears that MySQL (as described below) either used the SQL/XML facilities or concurrently invented the same thing. I'd like to think that it's the former, since I think that standards are a Good Thing ;^)

If you'd like to know more about SQL/XML, consult issues of the ACM SIGMOD Record over the last year or so, or attend the SD2004 West conference in Santa Clara, CA, in mid-March, 2004.

Hope this helps,
   Jim

At 04:42 AM 12/2/2003 Tuesday, Ben Trafford wrote:

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



========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
Oracle Corporation Oracle Email: mailto:jim.melton@xxxxxxxxxx
1930 Viscounti Drive Standards email: mailto:jim.melton@xxxxxxx
Sandy, UT 84093-1063 Personal email: mailto:jim@xxxxxxxxxxx
USA Fax : +1.801.942.3345
========================================================================
= Facts are facts. However, any opinions expressed are the opinions =
= only of myself and may or may not reflect the opinions of anybody =
= else with whom I may or may not have discussed the issues at hand. =
========================================================================



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



Current Thread