Using Django to manage XML configuration file
We're using Django to mange a set of XML configuration files through the django-admin interface.
Currently, I'm converting the XML values/hierarchies into Django models.
After this, we also need to code an import - to import in configuration files and populate Django models based on them, and also an export, to export from our Django models back into the finished XML configuration files.
However, another way might be just to inspect the XSD files for the XML files, and try to create the models from that.
I know there's django-models-schemas (https://bitbucket.org/eegg/django-model-schemas/wiki/Home), that is meant to generate XSD files from Django models. I'm not aware of anything going the other way (introspecting XSD files to get Django models). GenerateDS is the nearest match I can find, but it doesn't really solve our problem of converting cleanly to Django models at runtime.
The other issue is that the configuration XML format will change quite a bit - so ideally, reading directly from the XSD file would be good, if that's at all possible.
What's the best way of achieving this?
Alternately, is there an easier way of achieving the main goal - editing XMl configuration files through a Django interface? Anything else I should bear in mind?
I think I was in a similar problem with AIML (XML) files until I found this: http://readthedocs.org/projects/eulxml/. Now I don't need to duplicate data in XML and database. Hope it helps :)