Skip to main content

JAXB Project

1 reply [Last post]
yourpalcliffy
Offline
Joined: 2004-11-23

hi Everybody,

I am new to JAXB infact just heard about it a week back... After going through some tutorials on the internet.. got some overview on it.. I just want to know how is the JAXB project implemented...
For Eg:- Suppose I need to create a student database application...

Will all the student data be saved in an xml file.
1000 students = 1000 xml files OR

will it be 1 xml file representing all of them and the data will be stored in some other permanent storage...

Really curious about how projects are designed on JAXB... I would really appreciate if you give some expert comments on this topic...
--
Regards
Clifford

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dwichman
Offline
Joined: 2005-12-08

I'm a bit new to JAXB too, but I think it's really up to you (the developer) as to how the objects are stored. You create your schema (xsd), then run xjc on it to create the classes. Then you are free to build the object structure in your code, and then you can marshal it off to an OutputStream. So you can use one single XML document or many. You'd probably want to structure the documents in some meaningful manner, be it based on performance, project components or boundaries, etc.

I think the short answer is, it's up to you!