If anyone does do what Tim suggests they might get some inspiration from a plugin I built for my Gapfill question type to do GIFT style importing which can be seen here.
https://github.com/marcusgreen/moodle-qformat_gapfill_quick
I have no idea if it clashes with the syntax for other question types and I would offer no guarantees of robustness or completeness.