users@jaxb.java.net

Re: How do I separate the <xsd:choice/> sub elements into individual list properties?

From: Jarrod Roberson <jarrod_at_vertigrated.com>
Date: Fri, 12 Aug 2011 12:05:21 -0400

The code that gets generated by xjc creates just what I originally posted
List<Object>

Jarrod Roberson
678-551-2852

On Aug 12, 2011, at 11:26 AM, "Tinnefeld, Karsten" <tinnefeld_at_adesso.de>
wrote:

As you wrap them in a choice element, they come out any order, i.e., the
order you use in your xml instance. If you wish to extract one type, simply
loop over the list and pick out those that match your requirement. If you
need to manipulate them, take the whole list and alter them in place. They
don’t come back as Object, but wrapped in JAXB wrappers, which implement
JAXBElement.



Karsten