Skip to content

JSON to XML #9

@owennewo

Description

@owennewo

Having parsed a musicxml document into JSON using cxml. I can update the JSON and render it visually. Can you think a way of exporting the JSON back to musicxml after modifications.

I'd also like to create a JSON musicxml doc from scratch using javascript. Whilst i can create the json using duck typing - it doesn't have the XmlType wrappers which means that handling it in rendering engine is different/harder (e.g. no _exists). Some of the types that I wish to create don't seem to have constructors.

Looking at the following which was created using cxsd:
https://github.com/owennewo/musicxml-ts/blob/master/app/xmlns/www.musicxml.org.d.ts

I can create a note
let note = new musicxml.note();
but not
let measure = new musicxml.measure();

The latter gives
TypeError: musicxml.measure is not a constructor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions