-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use cxml in browser #5
Comments
Support should be coming this year, but it may still be some months away with so many ongoing projects. It will use the browser's native XML parsing, and process the result to use JavaScript objects matching the schema: if the schema allows several child elements of the same type, then even a single such child will be in an array, and placeholders will be added to the object prototypes for required elements so you code can rely on them being present. |
I've just started using cxml in an angular4/typescript app. It works. Took me a while to get it working - the system-config.ts requires a long list of map and packages declaration to get the dependent modules loaded. I expect there was an easier way but I'm new to javascript module loading. My browser loads the angular4 app from node/lite-server then it loads a remote musicxml file and then uses cxml.parser.parse(xml, musicxml.document). The musicxml.document was created using cxsd. @jjrv - does the work you are intending to do mean that you won't have so many node dependencies? |
@owennewo Congratulations on getting it working! Currently I'm working on the I'll do some testing but it seems likely to outperform using the browser's native parsing, since the browser creates a DOM tree that then gets thrown away. If the browsers' own parser runs faster after all, I'll use that. Current Ultimately a single |
can cxml used in browser env?
thanks.
The text was updated successfully, but these errors were encountered: