Ernest Friedman-Hill wrote:There are so many existing libraries in the automatic XML parsing/serializing/deserializing space that it would behoove you to look closely at what exists before deciding to create something new. But in any case, I think you've described a complex problem which, as posed, really has no satisfactory solution. Consider this: if the user provides an XML file and your system generates classes dynamically, how would the user's Java code compile against those classes? Now if the XML file is changed, doesn't this force the dynamic classes to change, and therefore require the user's Java code to be recompiled?
Before setting out to write anything, or even to adopt an existing solution, you need to sit down and consider your requirements in enough detail that you can answer these questions and any others that come up.