I would like to create a class in Java based on the fields defined in my XML config file:
For example: if the XML file contains (the syntax has been maligned for posting):
then internally it will create a class Event such as Event(String agentHost, String subSystem) that the client can instantiate. Note: the client always knows that this class will be called "Event" but does not know how many "mandatory parameters" it needs to pass.
On the other hand if I have a XML file with:
then it will create Event(String eventHost) that the client can use for instantiation.
Do you want to generate the code (the .java files) for static compilation? Or do you want to generate the code at runtime?