Polymorphism in XSD schema and JAXB classes

前端 未结 4 766
忘掉有多难
忘掉有多难 2021-01-31 10:01

I have an xml like this:


    
    
    

        
4条回答
  •  醉梦人生
    2021-01-31 10:09

    xsd:choice corresponds to the @XmlElements annotation. You could apply this annotation directly to your desired object model.

    For more information see:

    • http://bdoughan.blogspot.com/2010/10/jaxb-and-xsd-choice-xmlelements.html

提交回复
热议问题