I have to program a Byzantine system which is an over-engineered state machine. To do this I have to draw the state machine in a tool which translates that into XML. I feel like flagellating whenever IĀ do this, therefore, I am considering writing an XML generator in my favourite toy language. I imagine it would allow me to conjure spirits in a more leisurely manner.
Barring petty technicalities, it should be a matter of mapping the relevant entities from the XML schema.
My questions are: Have you tried something similar? Was it worth the effort?
Use something like JAXB on the XML schema so you can create instances of your state-machine-schema, then serialize the instance into XML. This way JAXB handles the mapping for you, and you can program in a reasonably-sane OO style and not worry about the PIG XML.
There are already quite a few XML parsers and generators, even for "toy" languages. Some will even generate the classes/objects for you in a comfortable manner (like using MOP to generate CLOS classes).
>>4 Xarn recently read Judith Herrin's Byzantium, which argues passionately against using the word ``Byzantine'' in that manner. Really, it's very unfair on the Byzantines.
Name:
OP2010-07-16 16:30
>>7
By generating I mean that particular language not XML itself. I am not interested in parsing XML itself. I am interested in experiences in using those to create a toy like I described in >>1 (replacement for a proprietary tool).
>>9 Hey gang, the thing I want to do has to do with a bunch of technologies. I won't tell you that I don't want to use those technologies, or give the slightest hint about what I'd like to do instead. You'll have to beat it out of me during the course of this thread. Has anyone done this incredibly specific thing before? ā /prog/ Quality ā indeed.