Jaxb marshalling more than one object
Hi, I'm wondering how do I go about marshalling more than one object to XML? and conversely how best to unmarshal the resultant XML document? I'm quite dispondant at the moment, despite continuous effort I'm not getting anywhere.
I know I'm getting it wrong, I can do this with 1 object no problem, but how can I do it with more than one? Could I use a List? Array? I need all objects to be in one XML file so that rules out just using lots of XML files of course.
I would genuinely appreciate seeing a working example of the classic jaxb marshalling code with the small addition of marshalling multiple objects. I hope you understand, I've tried to word my question as cohesively as possible... thank you.