xml学习中出现的错误

1、org.xml.sax.SAXParseException: src-element.3: Element 'UC4' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.

    

XML File:


        
        
        


XSD File :

        
                
                

                    
                    
                    
                        
                        
                        
                        
                    
                    

                
                
            
原因:当一个元素包含属性和文本时不能这样写

正确写法

  
    
      
        
        
        
        
      
    
  

      

转载于:https://www.cnblogs.com/Lanyuxuan/p/5243346.html

你可能感兴趣的:(xml学习中出现的错误)