java - JAXB Customizations and List<Object> -


I used JACAB to create some classes from an XSD. The result was not enough, which I expected and most likely it could be adapted.

It created a general list instead of 3 different lists. Can it be corrected in some way?

  @XmlElements ({@XmlElement (name = "M1", type = M1_Type.class), @ XML element (name = "M2", type = M2_Type.class), @ XMLElement (name = "M3", type = m3_Type.class)}) protected list & lt; Object & gt; M1Orm2OrM3;  

Is there any optimization to fix this?

You probably have a duplicate option, like something

  & Lt; Option maxOccurs = "unbounded" & gt; & Lt; Element name = "M1" ... /> & Lt; Element name = "M2" ... /> & Lt; Element name = "M3" ... /> & Lt; / Options & gt;  

The answer is negative, there is no such optimization "three lists" is actually a very different data structure.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -