Can we create a class from a xml file ?

Posted by panzerschreck on Stack Overflow See other posts from Stack Overflow or by panzerschreck
Published on 2010-05-06T00:43:54Z Indexed on 2010/05/06 0:48 UTC
Read the original article Hit count: 239

Hello,

Is it possible to create a class dynamically by reading an xml file ( in java preferably) ? if yes, please provide pointers on how to do it.

In the process of development, we have come up with a class that has 5 attributes, all these attributes correspond to an entry in the xml file, now if the user adds/modifies the xml entry the object corresponding to it must change automatically, one approach would be generate the source code, before compile time.Is there any other way ?

Is there any common pattern to model such changes in the system ?

Thanks,

© Stack Overflow or respective owner

Related posts about java

Related posts about object