I have been thinking some more following my earlier post about how good it would be to have a system for creating ActionScript classes from XML Schema, for binding XML data to code.
I thought it might be a good idea to set something of this nature up as web service, or a web application, using Google AppEngine. I found a Python system called generateDS that does pretty much exactly what I want, except it produces Python classes instead of AS3 ones. I got in touch with Dave Kuhlman, the author of generateDS; he pointed out that the system was written specifically for generation of Python code, not for producing other code in other languages. It should be refittable for AS3 but it would take quite a bit of deep hacking.
Another possibility would be to work from the XMLBeans codebase; but this is Java, and that would exclude the possibility of working with AppEngine.
I would just code it up in AS3 - possibly as an AIR app - but I hesitate to do so, because ideally this kind of tool should have a CLI, so that it can be used in build scripts.
Maybe I should write my own from scratch in Python or Ruby.
Hmm…


I don’t agree at all on having XML generating AS3 classes, but for the CLI thing you have few options
1) use command line arguments to launch an AIR app
2) look into Tamarin, it’s the AVM running in a command line, in short you can write AS3 code running into a CLI
I’d love to see an XSD -> actionscript utility. I’ve been using CodeSynthesis’ XSD for parsing COLLADA files in C++ using the schema, and it makes a lot of sense.
Microsoft’s xsd.exe (part of .Net) can generate *javascript* from XSD… maybe there’s a way to call the .js from the flash, or to convert the .js to .as…? Not a pleasant solution though.
Tim