I would like to parse an .mxl file (MusicXML) with clojure
So far i've seen a lot of tools to work with .xml files but I can't find a way to work with .mxl, maybe i should convert mxl to xml first but i don't know how to do that neither.
if someone stumbles upon this, and can't figure out how to unzip the compressed mxl file:
on mac, I just renamed it to .zip and it worked out fine!
MusicXML's zip structure for .mxl files is similar to that of the EPUB format. See http://www.musicxml.com/tutorial/compressed-mxl-files/zip-archive-structure/ in the MusicXML tutorial for more information about where to find the XML score data within the MXL archive.
From the Wikipedia page on MusicXML:
I'm guessing that your .mxl file is an XML file which has been compressed, and this is why you're getting parse errors. As far I can gather, the compression algorithm is a zip algorithm, so you should be able to use java's zip functionality to get at it.
EDIT
I just had a go at this with a sample .mxl file I found online. The .mxl file, once unzipped contained the xml file within it. I was then able to use following (inspired by this answer) to get the raw XML...