This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Identifying elements inside choice by JAXB  RSS feed

Balamurugan Balasubramanian
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an element whose definition is like this.
<!ELEMENT JMXNode (NodeName, JMXServiceURL?, (JMXNode | MBean)*)>

When I generated JAXB classes using XJC compiler for this,
the file generated for this element has only one list for all the child elements, irrespective of whether it is mandatory, optional, or choice.
This is creating issues when I tried to unmarshall this element. This also allows me to validate an invalid XML.

I am using JAXB version 1.0. Any thoughts on this issue ???
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!