Is it possible to dump data in xml format without the database name in the output?
If I dump output like this with the –xml option:
$>mysqldump --xml my_database_name my_table > my_table.xml
Then my output is something like
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="my_database_name">
...
You can see the database name in the output which I do not want.
Is there an option to prevent that?
I don’t think there is such option for the mysqldump command. After generating the XML file, you can always use a script to get rid off the database tags from the dump file. In Windows’ PowerShell you could always use the following command: