Re: MNX Proposal now Available [via Music Notation Community Group]

>
> I bet that MNX stands for Music Notation XML, and then what you want to
> save is the notation, not the music itself (otherwise you would use an
> approach more similar to MIDI).
>
Not bad, and you didn't even have to read the spec!  :-)

Yes, this is about saving a score, which is instructions on how to perform
music, as distinct from music itself.

> And in my experience as a programmer I also think that XML is not a very
> good format to support "operations" (move a note to another measure, etc.),
> only serialize and de-serialize. I think the XML should be transformed to a
> object structure in memory and the operations should be performed to those
> objects, then saved again. And here you can choose to save all the XML
> again or replace only the one referred by the objects that have changed,
> but that is a matter to decide by every software developer (for example, my
> Kunkunshi Editor saves everything again as the XML parser I use is very
> simple).
>

As you say, one shouldn't use XML itself to perform these operations (and I
hope no one does).

Standard modern practice is to parse XML into memory using a Document
Object Model (DOM) parser and manipulate the in-memory structure via the
DOM API -- a web standard, see
https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model. It
can then be serialized back out.

This practice is so ubiquitous that web programmers like me will talk in
terms of manipulating the document, when what we really mean is
manipulating the DOM in memory!

...Joe

Received on Thursday, 30 March 2017 22:06:29 UTC