My project is in NetBeans 6.7. I have previously used SAX to parse my XML. However, a colleague has done some work for me on my program using JAXB. He has written the schema and uses the bindings to automatically generate the code. This is a radically different approach.
How do you use JAXB? The "data" classes are auto-generated, but my "data" classes have algorithms in them as well. They are not just fields/getters/setters. How do you integrate it into the architecture of your application?
Do you separate out the data and the algorithms and use the getters/setters in the auto-generated code? Or, do you have your own classes for the data and just use the auto-generated ones for the purposes of reading/writing from XML?
If you alter the schema, it will generate different codes and you will get compiler errors. There is no "refactoring" like if you were coding it yourself. Is there any way around this?
Is there any way to include your own code within the auto-generated stuff?
JAXB puts the fields as Protected. Is there any setting to make them Private?
I never mix my domain model with application logic. AFAIK this is considered as good design. Mixing model and processing concerns should be avoided.
JAXB can also work with private fields. The following tutorial demonstrates this: Java and XML - Tutorial
Best regards, Lars