Reading and writing XML data using CONNECT
There is a lot of data stored in XML format. MariaDB can easily export data as XML, but before the CONNECT engine, it did not have a way to easily read from and write to external XML documents.
Getting ready
Import the ISFDB
database as described in the Importing the data exported by mysqldump recipe from Chapter 2, Diving Deep into MariaDB. Then, install and enable the CONNECT storage engine as described in the Installing the CONNECT storage engine recipe at the beginning of this chapter. Then, export the isfdb-001.xml
file as described in the Producing XML output recipe from Chapter 2, Diving Deep into MariaDB. For this recipe, it is assumed that the XML
file is located in /tmp/isfdb-001.xml
, but it will be wherever we were when we exported it from MariaDB. We'll need to alter the FILE_NAME
option in the recipe to point at it.
How to do it...
Launch the
mysql
command-line client application and connect to theisfdb
database on our MariaDB server.Run...