Regenerating classes using JAXB without loosing changes

After I generate classes from the DTD I would like to add some functionality to these classes.But if the DTD changes I would like to regenerate these classes without loosing the changes I have made.Is is possible and how ?
[257 byte] By [yaronsuson] at [2007-9-26 3:14:32]
# 1
Modifying generated files is usually a bad idea, therefore you should look for some other solution.The answer to your question is no, you can't "save" the changes and have the generator recognize those changes and re-incorporate them.Good luck -
mgreene at 2007-6-29 11:24:56 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
The suggested solution to this, is using a subclass. In the subclass, you can override whatever functionality you need, and it stays after regeneration.You will need to adapt the Dispatcher to use your subclass instead of the generated one.
ggeens at 2007-6-29 11:24:56 > top of Java-index,Archived Forums,New To Java Technology Archive...