midi2xml contains functions to read xml files as midi data, and write midi data to xml files
magenta is required for the read_from_xml function. It can be found here: https://magenta.tensorflow.org/
pretty_midi is a library containing functions/classes for the manipulation of midi data. It is required for this library to work. It can be found here: https://github.com/craffel/pretty-midi
import midi_xml_read_write as xml_rw
import pretty_midi
midi_data = xml_rw.read_from_xml('example.mxl')
import midi_xml_read_write as xml_rw
import pretty_midi
midi_data = pretty_midi.PrettyMIDI('example.mid')
write midi_data to xml file
xml_rw.write_to_xml(midi_data, 'example.mxl')