Hector Barbossa
Hector Barbossa

Reputation: 5528

Multiple XML files using JAXB

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

Answers (1)

Ben
Ben

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

Related Questions