[thelist] generating XML from MySQL tables

Diego Barcia webmaster at sci-web.com.ar
Mon Nov 11 11:39:01 CST 2002


On Monday, November 11, 2002 2:20 PM Garrett Coakley wrote:
>So if you wanted to dump out an xml feed of the 'user'
> table from the 'mysql' database you would do:
>
> mysql --xml -u <username> -p mysql user
>

Thanks a lot...,

Diego.

----- Original Message -----
From: "Garrett Coakley" <garrett at polytechnic.co.uk>
To: <thelist at lists.evolt.org>
Sent: Monday, November 11, 2002 2:20 PM
Subject: Re: [thelist] generating XML from MySQL tables


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, 11 Nov 2002 12:58:34 -0300 Diego Barcia wrote:
>
> > does anyone know how to generate XML automatically from a MySQL table,
> > or tables, or database, under Win98, or if is that possible?
>
> [snip]
>
> > mysqldump --xml databasename [tables]
>
> [snip]
>
> > to do that, but I get a syntax error from MySql (ERROR 1064)... Also,
> > I don't understand the syntax [tables] in that command. I guess if you
> > have a db called 'db' and a table called 'sales' you should write:
> > mysqldump --xml db [sales]? Or [tables] is optional?
>
>
> You're close.
>
> The general rule when looking at command line tools is that anything in
> []'s is an optional parameter (well, thats the way it is for a lot of
> the GNU stuff). So if you wanted to dump out an xml feed of the 'user'
> table from the 'mysql' database you would do:
>
> mysql --xml -u <username> -p mysql user
>
> Here that returns:
>
> <?xml version="1.0"?>
>         <user>
>                 <Host>localhost<Host>
>                 <User>martin<User>
>                 <Password>nottellinya<Password>
>                 <Select_priv>N<Select_priv>
>                 <Insert_priv>N<Insert_priv>
>                 <Update_priv>N<Update_priv>
>                 <Delete_priv>N<Delete_priv>
>                 <Create_priv>N<Create_priv>
>                 <Drop_priv>N<Drop_priv>
> [snip]
>
> HTH
>
> G.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.0 (GNU/Linux)
>
> iD8DBQE9z+bl4AAXt40rqS4RAq5ZAJkB0h7Szz4Nhysi91l/cJZW1LY32gCfTb89
> lVU6eTDXczi4Q0NNfiFU5Tg=
> =Ormb
> -----END PGP SIGNATURE-----
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list