Bug #23167 Output of 'mysql --xml' in a more appealing XML-format
Submitted: 11 Oct 2006 8:45 Modified: 28 May 2009 11:37
Reporter: Geri Broser Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Query Browser Severity:S4 (Feature request)
Version: Ver 14.12 Distrib 5.0.24a, for Win32 OS:Any (All(?))
Assigned to: CPU Architecture:Any
Tags: --xml, command line tool, MySQL, option, workbench, XML

[11 Oct 2006 8:45] Geri Broser
Description:
(See also forum thread http://forums.mysql.com/read.php?44,96517,120449#msg-120449)

The output format of 'mysql --xml' is:

<resultset statement="...">
<row>
<field name=".."> ...field contents... </field>
...more fields
<row>
...more rows
<resultset>

with a simple DTD like:

<!ELEMENT resultset (row)+>
<!ATTLIST resultset
statement CDATA #IMPLIED>
<!ELEMENT row (field)+>
<!ELEMENT field (#PCDATA)+>
<!ATTLIST field
name CDATA #IMPLIED>

How to repeat:
Perform 'mysql --xml' on any table.

Suggested fix:
From an abstract point of view the following would be better (with a table 'user' and a joined table 'address', for instance):

<user>
<first_name>John</first_name>
<last_name>Doe</last_name>
<address>
<country>Austria</country>
<zip>2344</zip>
<city>Maria Enzersdorf</city>
</address>
</user>

With a more appealing DTD like:

<!ELEMENT user (first_name, last_name, address)>
<!ELEMENT first_name (#PCDATA)>
<!ELEMENT last_name (#PCDATA)>
<!ELEMENT address (country, zip city)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT zip (#PCDATA)>
<!ELEMENT city (#PCDATA)>

This is how XML is meant to be used, as far as I understand it.
[11 Oct 2006 8:50] Geri Broser
This, of course, applies to MySQL Query Browser as well.
[14 Jan 2009 17:31] Susanne Ebrecht
Many thanks for writing a feature request. This also could be interesting for Workbench and so I will set this to verified that we can think about it for Workbench.
[28 May 2009 11:37] Susanne Ebrecht
Many thanks for writing a bug report. We are on the way to implement full functionality of MySQL Query Browser into MySQL Workbench. We won't add this feature request anymore.

More informations about MySQL Workbench you will find here:

http://dev.mysql.com/workbench/