XML -> MWEL rough translator

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

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

That sounds fine - thanks.

Mark

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

Attachment: xml2mwel.py (7.31 KB)