XML -> MWEL rough translator

mhisted's Avatar

mhisted

06 Sep, 2017 03:11 PM

Hi Chris,

If it were relatively easy for you, it would be nice to have a rough translator from XML -> MWEL. It doesn't need to be perfect, as this would be for one-time conversions, but it should err on the side of notifying on any XML constructs that it can't be sure how to translate. Python's 2to3 is probably good inspiration.

Is that something you'd consider? If so, do you think you'd get to it in the next month? I have a few expts I plan to translate to MWEL.

Mark

  1. Support Staff 1 Posted by Christopher Sta... on 07 Sep, 2017 07:42 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    This is something I've thought about and would like to do, but I worry it might end up taking more time than I really have at the moment. Let me play around with it a little and try to assess better.

    Chris

  2. 2 Posted by mhisted on 07 Sep, 2017 09:42 PM

    mhisted's Avatar

    That sounds fine - thanks.

    Mark

  3. Support Staff 3 Posted by Christopher Sta... on 06 Oct, 2017 06:01 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    I've attached a first pass at an XML-to-MWEL converter. It's not perfect, but it does a pretty good job. Usage:

    python xml2mwel.py exp.xml > exp.mwel
    

    Eventually, I'd like to distribute it with MWorks, but I think it needs more work first. However, it should still be pretty useful as is. If you have any problems with it, please let me know.

    Chris

  4. Christopher Stawarz closed this discussion on 20 Nov, 2017 03:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac