c# - Xml Type ... is not declared, or is not a simple type -


i'm getting xml schema xero : https://github.com/xeroapi/xeroapi-schemas

var assembly = assembly.getexecutingassembly();             var stream = assembly.getmanifestresourcestream("xeroconnector.xmlschemas." + selectedendpoint.schema + ".xsd");              using (var reader = xmlreader.create(stream))             {                 schema = xmlschema.read(reader, null);             }              schemaset.add(schema); 

the schema embedded resource in project. when tried schemaset.add(schema); "type 'entityvalidationstatus' not declared, or not simple type". below schema :

<?xml version="1.0" encoding="utf-8"?> <xs:schema id="items"     elementformdefault="qualified"     xmlns:xs="http://www.w3.org/2001/xmlschema" >   <xs:include schemalocation="basetypes.xsd" />    <xs:element name="items" nillable="true" type="arrayofitem" />    <xs:complextype name="arrayofitem">     <xs:sequence>       <xs:element minoccurs="0" maxoccurs="unbounded" name="item" nillable="true" type="item" />     </xs:sequence>   </xs:complextype>    <xs:complextype name="item">     <xs:all>       <xs:element minoccurs="0" maxoccurs="1" name="validationerrors" type="arrayofvalidationerror" />       <xs:element minoccurs="0" maxoccurs="1" name="warnings" type="arrayofwarning" />        <xs:element name="itemid" type="uniqueidentifier" minoccurs="0" maxoccurs="1" />       <xs:element name="description" type="xs:string" minoccurs="0" maxoccurs="1" />       <xs:element name="purchasedescription" type="xs:string" minoccurs="0" maxoccurs="1" />       <xs:element name="code" type="xs:string" minoccurs="0" maxoccurs="1" />        <xs:element name="updateddateutc" minoccurs="0" maxoccurs="1" type="xs:datetime"/>       <xs:element name="salesdetails" type="itempricedetails" minoccurs="1" maxoccurs="1" />       <xs:element name="purchasedetails" type="itempricedetails" minoccurs="1" maxoccurs="1" />        <xs:element name="name" type="itemnametype" minoccurs="0" maxoccurs="1" />       <xs:element name="istrackedasinventory" type="xs:boolean" minoccurs="0" maxoccurs="1" nillable="false" />       <xs:element name="inventoryassetaccountcode" type="accountcode" minoccurs="0" maxoccurs="1" />       <xs:element name="totalcostpool" type="xs:decimal" minoccurs="0" maxoccurs="1" />       <xs:element name="quantityonhand" type="xs:decimal" minoccurs="0" maxoccurs="1" />       <xs:element name="issold" type="xs:boolean" minoccurs="0" maxoccurs="1" nillable="false" />       <xs:element name="ispurchased" type="xs:boolean" minoccurs="0" maxoccurs="1" nillable="false" />      </xs:all>     <xs:attribute name="status" type="entityvalidationstatus" use="optional" />   </xs:complextype>    <xs:complextype name="itempricedetails">     <xs:all>       <xs:element minoccurs="0" maxoccurs="1" name="validationerrors" type="arrayofvalidationerror" />       <xs:element minoccurs="0" maxoccurs="1" name="warnings" type="arrayofwarning" />        <xs:element name="unitprice" type="itemprice" minoccurs="0" maxoccurs="1" />       <xs:element name="taxtype" type="taxtype" minoccurs="0" maxoccurs="1" />       <xs:element name="accountcode" type="accountcode" minoccurs="0" maxoccurs="1" />       <xs:element name="cogsaccountcode" type="accountcode" minoccurs="0" maxoccurs="1" />      </xs:all>     <xs:attribute name="status" type="entityvalidationstatus" use="optional" />   </xs:complextype>  </xs:schema> 


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -