MusicXML indent/unindent output formatting

• Mar 22, 2013 - 11:09
Type
Functional
Severity
S5 - Suggestion
Status
by design
Project

Exported MusicXML files don't look pretty, indentation is wrong.
This is because musescore indents the next line after an opening tag, but forgets to UN-indent when writing the closing tag, every time!
A minor issue, but shouldn't be difficult to fix I guess?


Comments

This is by design and has been like this in all MuseScore versions. The MuseScore file format (which also is xml) uses the same indentation. Both the MuseScore and the MusicXML writer use the same code to write xml, which enforces the layout.

OK, it's not a bug, I understand. But I still don' t like it. If I take a look at MusicXML examples from //www.musicxml.com/music-in-musicxml/example-set/ and exported from Finale and others I always see an indentation scheme where the opening and closing tags are aligned.

For people who agree with me I have a solution. I use the "tidy" command //tidy.sourceforge.net/ on my Linux commandline to get what I want:
# tidy -i -xml mscore-example.xml > mscore-example2.xml

Apparently the makers of HTML tidy agree with me.