Shared class for child element in JAXB in different xmls/roots

前端 未结 2 798
感动是毒
感动是毒 2021-01-19 17:17

In JAXB when using automatic class generation via xjc from xsd scheme.

alpha.xsd



        
2条回答
  •  被撕碎了的回忆
    2021-01-19 17:57

    You can use an external binding file to indicate that during class generation we wish to use our existing class for the complex type called Document.

    binding.xml

    
    
        
            
                
            
        
    
    

    XJC Call

    xjc -b binding.xml beta.xsd
    

提交回复
热议问题