xts is a script that generates an insert statement or yaml from a mysql xml dump file.
xts is not a tool for restoring database.If your goal is to restore, you may want to refer to this.
xts is designed for tiny use cases such as the following.
- In languages other than Go, MySQL dump files in xml format are used as fixtures for unit tests.
- I want to reuse the above fixtures in unit tests for a project whose implementation language is Go.
$ brew install genkiroid/tap/xts
Precompiled binaries for released versions are available in the releases page.
$ go get github.com/genkiroid/xts/...
$ xts path-to-mysql-dump.xml
$ xts -d /tmp/ path-to-mysql-dump.xml
$ xts -y path-to-mysql-dump.xml
$ xts -y -d /tmp/ path-to-mysql-dump.xml
Example is here.