JAXB - Property “Value” is already defined. Use to resolve this conflict

前端 未结 7 595
再見小時候
再見小時候 2020-11-30 19:01

Using JAXB to generate XML binding classes.

The schema is based on a set of legacy XML files, and includes this snippet:



        
7条回答
  •  心在旅途
    2020-11-30 19:35

    If you want to avoid creating/changing a JAXB bindings file, and you don't mind annotating your XSD, you can add the jxb:property annotation to your attribute's definition, e.g.:

    
        
            
                
                
                
                    
                    
                        
                            
                        
                    
                
            
        
    
    

    with suitable additions to the xs:schema tag:

    
    

提交回复
热议问题