Multiple instances and wrong parental links

Josh English Joshua.R.English at gmail.com
Sun Jan 2 16:51:29 EST 2011


Steven, 

This was simplified. The complete story is, well, tedious:

I have created a set of XML Validation and Normalization classes. With them I can define my data structures and make sure my data is good. These complications have come in wanting to take this tool and create a GUI (in wxPython) around these objects. Okay, really these complication come from me generalizing the problem, probably one step too far. I want a tool to take my structural definition and create the GUI. To use some of the "easy" tools like Validators that transfer data to the GUI and back, I need an interface.

I tried creating validators that went straight to the element, but that got complicated. 

Then I created a map from a dictionary to an element (as defined by the XML validation tool) and back again. This also bogged down and fixing one problem undid all the other progress I had made.

So this is my third attempt: create a Python object around the XML definition.

I've looked at pyxb. It doesn't make any sense to me. I looked at pysxer, that made even less sense. Hence, I try it on my own.

The Element List isn't a list, it has the same interface as a list, but always goes back to the original XML element (an elementree.Element object in this case.) 

Insanely complicated and just beyond my comprehension, I fear. I haven't found an easier way to wrap an object around these XML validators of mine.

Josh



More information about the Python-list mailing list