2653 shell>  mysql --xml -e "SELECT * FROM test.person" > person-dump.xml shell>  cat person-dump.xml <?xml version="1.0"?> <resultset statement="SELECT * FROM test.person" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <row>  <field name="person_id">1</field>  <field name="fname">Kapek</field>  <field name="lname">Sainnouine</field> </row> <row>  <field name="person_id">2</field>  <field name="fname">Sajon</field>  <field name="lname">Rondela</field> </row> <row>  <field name="person_id">3</field>  <field name="fname">Likema</field>  <field name="lname">Örrtmons</field> </row> <row>  <field name="person_id">4</field>  <field name="fname">Slar</field>  <field name="lname">Manlanth</field> </row> The inverse of the import operation just shown—that is, dumping MySQL table data into an XML file—can be accomplished using the  mysql  client from the system shell, as shown here: This shows, as stated earlier in this section, that any or all of the 3 permitted XML formats may appear in a single file and be read using  LOAD XML . mysql>  SELECT * FROM person; +-----------+--------+------------+---------------------+ | person_id | fname | lname | created | +-----------+--------+------------+---------------------+ | 1 | Kapek | Sainnouine | 2007-07-13 16:18:47 | | 2 | Sajon | Rondela | 2007-07-13 16:18:47 | | 3 | Likame | Örrtmons | 2007-07-13 16:18:47 | | 4 | Slar | Manlanth | 2007-07-13 16:18:47 | | 5 | Stoma | Nilu | 2007-07-13 16:18:47 | | 6 | Nirtam | Sklöd | 2007-07-13 16:18:47 | | 7 | Sungam | Dulbåd | 2007-07-13 16:18:47 | | 8 | Sreraf | Encmelt | 2007-07-13 16:18:47 | +-----------+--------+------------+---------------------+ 8 rows in set (0.00 sec) As can be seen by the response from the server, 8 rows were imported into the  test.person  table. This can be verified by a simple  SELECT  statement: The  ROWS IDENTIFIED BY ’<person>’  clause means that each  <person>  element in the XML file is considered equivalent to a row in the table into which the data is to be imported. In this case, this is the person  table in the  test  database. Here, we assume that  person.xml  is located in the MySQL data directory. If the file cannot be found, the following error results: LOAD XML Statement Query OK, 8 rows affected (0.00 sec) Records: 8 Deleted: 0 Skipped: 0 Warnings: 0 ERROR 2 (HY000): File ’/person.xml’ not found (Errcode: 2)