• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Identifying elements inside choice by JAXB

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 JMXNode.java 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 ???
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic