Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAXB unmarshal problem with XSD choice element  RSS feed

 
S Norman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm experiencing a problem unmarshalling a <choice> element in an XML document using JAXB RI 2.2.1.

The element is defined as follows (the full XSD is too large to post):



Here is the XML I'm trying to unmarshal:



When I run the document through the unmarshaller, the resulting PatternExpression object contains the PatternOperator and a single Pattern, which happens to be the last one in the sequence.

Does anyone have any suggestions as to why the Pattern objects are not being added to the list?

I would think that the presence of the PatternOperator would allow JAXB to determine what <choice> the element fall into.

FYI, the XML schema is controlled by a 3rd party, so it cannot be modified.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!