A way to edit instruments.xml

• Feb 28, 2010 - 00:00

Is there any way for a plug-in to read and edit the instruments.xml file? I'm not a javascript programmer but I see that the XMLDOM isn't allowed when writing plugins for MuseScore.


Comments

Your main problem will not be reading XML but writing the file in "root" or "admin" owned directory. MuseScore on Windows and Mac is installed in admin space and normally you can't write in this directory except if MuseScore got special privileges.
This behavior is not ideal to edit instruments.xml, add templates, install plugins & language files etc...

If you still need to read and write XML, you can use the QtXml module binding.
See http://doc.trolltech.com/4.6/qtxml.html and adapt to QtScript.

Surely on the Mac the instruments.xml should be in the library? E.g. /Library/Preferences/MuseScore. That ought to be a default file, because the user still couldn't edit it, but the user should have a local editable copy in ~/Library/Preferences/MuseScore so that each user could have their own tweaked version.

--
colin

Do you still have an unanswered question? Please log in first to post your question.