I am designing a reference implementation for EmotionML (W3C's language for machine representation of emotions) in Python and I would like some design suggestions on data types to XML binding (I guess you can say I am crowdsourcing some design ideas).
I would like suggestions and pointers to some design and code of people who might have already done similar. My tendency is to just use Java path I am familiar of creating objects that correspond to the structures of XML and have them translated into DOM.
OO gives me polymorphism but creates a more intricate object structure, where Python is very good about set representation and use of built in collections.
I am looking for possible more elegant approach. Could I define my own non-object structs and interrogate these and translate into DOM?
How would I represent optional, mandatory attributes, elements using lists and dictionaries?
These are all my design thoughts and dilemmas, not per say cries for help.
I could figure these things on my own, so I am truly soliciting mature, benevolent suggestions from experienced Python designers and developers.
Thanks in advance, Edmon