How to link XML to XSD using schemaLocation or noNamespaceSchemaLocation?

后端 未结 1 1685
一生所求
一生所求 2020-11-22 08:32

I found some tips for this problem, but still didn\'t help me.

Here is my XML




        
1条回答
  •  佛祖请我去吃肉
    2020-11-22 09:26

    How to link an XSD to an XML document depends upon whether the XML document is using namespaces or not...

    Without namespaces

    Use xsi:noNamespaceSchemaLocation to provide a hint as to the XSD to be used:

    • XML

      
        
      
      
    • XSD

      
        
          
        
      
      

    With namespaces

    Use xsi:schemaLocation to provide a hint as to the XSD to be used:

    • XML

      
        
      
      
    • XSD

      
        
          
        
      
      

    0 讨论(0)
提交回复
热议问题