Java/JAXB: Unmarshall Xml to specific subclass based on an attribute

后端 未结 5 2092

Is it possible to use JAXB to unmarshall xml to a specific Java class based on an attribute of the xml?


  

        
5条回答
  •  有刺的猬
    2020-11-27 19:37

    AFAIK, you'll have to write an XmlAdapter which knows how to handle the marshal/unmarshalling of the Shape.

提交回复
热议问题