This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

embedding xmlelement tags in classes generated by jaxb and xjc  RSS feed

 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!