File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes embedding xmlelement tags in classes generated by jaxb and xjc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "embedding xmlelement tags in classes generated by jaxb and xjc" Watch "embedding xmlelement tags in classes generated by jaxb and xjc" New topic
Author

embedding xmlelement tags in classes generated by jaxb and xjc

Stuart Rogers
Ranch Hand

Joined: Oct 02, 2008
Posts: 133
Eclipse/Maven with jaxb2-maven-plugin 1.3 in pom . The pom has two profiles, one using schemagen and the other xjc, so I can marshall and unmarshall. But my java classes generated by xjc do not have xmlelements associated with each java class attribute.

In other words, what I get now in my generated class is

and what I'd like to get is

How do I go about achieving that? Do I need to add something to my bindings.xjb ? and if so what?

TIA,

Still-learning Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: embedding xmlelement tags in classes generated by jaxb and xjc
 
Similar Threads
JAXB and marshalling
Class concept Explanation
jaxb marshalling problem
return complex typ
Need Help With JAXB Unmarshaller - Convert XML Back to Java Bean