如何克服此xsd错误如果模式中的'nillable'属性为false,则实例中不得存在'xsi:nil'属性 [英] how to overcome this xsd error If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute must not be present in the instance

查看:304
本文介绍了如何克服此xsd错误如果模式中的'nillable'属性为false,则实例中不得存在'xsi:nil'属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi使用xml我通过命令提示符使用xsd选项生成了xsd.但是现在问题是传递的xml已更改,现在xml nil = true包含如下内容

< beneficiary_address_line_1 xsi:nil ="true" xmlns:xsi =#unknown">


但我的xsd就像这样


hi using xml i generated an xsd using xsd option by command prompt .But now the problem is passing xml been changed and now the xml nil =true contains as below

<beneficiary_address_line_1 xsi:nil="true" xmlns:xsi="#unknown">


but my xsd is like this


<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="artners" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="artners" nillable="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="artner" nillable="true">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ID" type="xs:string" minOccurs="1" msdata:Ordinal="0" />

....

现在我的xsd抛出以下错误plz告诉我如何解决此错误




如果架构中的"nillable"属性为false,则实例中不能存在"xsi:nil"属性

....

now my xsd throwing the following error plz tell me how to solve this errro




If the ''nillable'' attribute is false in the schema, the ''xsi:nil'' attribute must not be present in the instance

推荐答案

This[^] is how you research an error message. It seems clear enough to me. If your schema says not to support nillable, you can''t use it.


这篇关于如何克服此xsd错误如果模式中的'nillable'属性为false,则实例中不得存在'xsi:nil'属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆