Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Return Query Output in XML Format
How To Return Query Output in XML Format? - MySQL FAQs - Command-Line End User Interface mysql
✍: FYIcenter.com
By default, "mysql" returns query output in text table format. If you want to receive query output in XML format, you need to use the "-X" command option. Here is a good tutorial exercise:
>cd \mysql\bin
>mysql -u root -X test
mysql> SELECT * FROM links;
<?xml version="1.0"?>
<resultset statement="SELECT * FROM links">
<row>
<field name="id">1</field>
<field name="name">dba.fyicenter.com</field>
</row>
<row>
<field name="id">10</field>
<field name="name">dba.fyicenter.com</field>
</row>
</resultset>
2 rows in set (0.00 sec)
2007-05-10, 5015👍, 0💬
Popular Posts:
How is the MVC design pattern used in Struts framework? In the MVS design pattern, there 3 component...
What will be printed as the resultof the operation below: int x; int modifyvalue() { return(x+=10); ...
How To Enter Microseconds in SQL Statements? - MySQL FAQs - Introduction to SQL Date and Time Handli...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
What is V model in testing? V model map’s the type of test to the stage of development in a project....