MidiMessage to Xml?

Hey guys, is there any simple way to create xml from a midimessage?

Thanks in advance.

You’d have to roll your own… But the MIDI standard does provide some information on how it could be formatted, and MusicXML does, too.

http://www.midi.org/dtds/MIDIEvents10.dtd.html

http://www.musicxml.com/for-developers/musicxml-dtd/standard-midi-file/