jaxb bindingx.xml “results in too many target nodes”

后端 未结 2 1702
感情败类
感情败类 2021-02-12 19:06

I\'m trying to make just one adapter for every type of element, so I created a bindings.xml file:

<         


        
2条回答
  •  孤街浪徒
    2021-02-12 20:01

    I end up with a similar problem "too many target nodes(3)" however could not find any answer on any of the sites...Posting the solution which I found after lots of trail and error...Basic idea to solve "too many target nodes(3)" is to give complete XPATH of the node which is multiple in your XSD.

    Below is my XSD:

    
      
        
          
            
              
                
                  
                    
                      
                        
                          
                            
                              
                                
                              
                            
                          
                        
                        
                          
                            
                              
                                
                              
                            
                          
                        
                        
                          
                            
                              
                                
                                  
                                    
                                      
                                        
                                          
                                            
                                              
                                                
                                                  
                                                
                                              
                                            
                                          
                                          
                                            
                                              
                                                
                                                  
                                                  
                                                
                                              
                                            
                                          
                                        
                                        
                                      
                                    
                                  
                                
                              
                              
                                
                                  
                                    
                                      
                                    
                                  
                                
                              
                            
                          
                        
                        
                          
                            
                              
                                
                              
                            
                          
                        
                        
                          
                            
                              
                                
                              
                            
                          
                        
                      
                      
                    
                  
                
                
                
              
            
          
        
      
    
    

    and below is the JAXB binding file which is working for above XSD:

    
        
            
    
            
            
                
                    
    
                        
                            
                                
                            
                        
    
    
                        
                            
                                
                            
                        
    
                        
    
                            
                                
    
                                    
                                        
                                            
                                        
                                    
    
                                    
                                        
                                            
                                        
                                    
    
                                
                            
    
                        
    
                        
                                
                                    
                                
                        
    
                        
                            
                                
                            
                        
                    
                
              
        
    
    

提交回复
热议问题