Defining an XML element that must be empty or decimal

后端 未结 3 1616
星月不相逢
星月不相逢 2021-01-22 05:52

I have the following XSD which was generated by VS from an example XML file:

                
                  

        
3条回答
  •  深忆病人
    2021-01-22 06:35

    It sounds as if your use case is very like some of the motivating cases for xsi:nil. From your description, it sounds as if you made the element nillable, but then fed it an non-nilled instance of the form

    
    

    instead of specifying that the element should be nilled:

    
    

    If you want to modify the type, the methods described by kjhughes and Michael Kay should work fine.

提交回复
热议问题