Reputation: 5528
This is a sample XML using JAXB from a Class
<Nodes>
<Node>
...
</Node>
<Node>
...
</Node>
...
</Nodes>
I want to keep each of these Node in separate xml. So how to design the Bean in java?
Upvotes: 0
Views: 712
Reputation: 2801
I would create an XSD document that captures all your requirements and then have JAXB create the beans for you.
A good example on how to this can be found at:
http://blog.bdoughan.com/2011/04/xml-schema-to-java-xsd-choice.html
Upvotes: 1