I view XMLBeans as a necessary evil (sometimes not even that). You want a simple way to bind (or marshal and unmarshal) XML documents to Java objects. Now, you can do so clumsily with DOM or you can use a mapper such as XMLBeans or JAXB or JiBX. Each of them has trade-offs. However, you have to remember that in most normal usage patterns, the XML document is the 'source code'. The Java objects generated are just that, derived artefacts. I would not even check them into my source control. Write your own POJO's and simply use the generated Java 'objects' from XMLBeans, JAXB or JiBX. But definitely do not design your domain model around whatever crud these mappers produce.
- Saish
XMLBeans is a specific technology. It is used for accessing XML-based data from a Java program by binding the data to Java types.
XMLBeans can be used to implement an object-oriented software design that uses one or more object-oriented design patterns.
XMLBeans is not part of any design pattern however. Design patterns do not specify any technologies or mandate any specific implementation details. There is a difference between software design and software programming. Design patterns are used for software design and XMLBeans technology (classes) are used in software programming.