Conventions in XSD files to prepare for import

The XSD file has indicators for how to set up your import XML data.

  • If minOccurs is 0, then the data element is optional for import.
    </xs:element>
    <xs:element name="SUPERVISOR" default="Chris Smith" minOccurs="0" 
    msdata:0rdinal="2">
       xs:simpleType>
          <xs:restriction base="xs:string">
             <xs:maxLength value="80"  />
          </xs:restriction> 
       </xs:simpleType>
    </xs:element>
    
  • If there is no minOccurs, then you must include the element unless there is a default.
    <xs:element name="DESCRIPTION" default="default record" 
    msdata:0rdinal="1">
    
       <xs:simpleType>
          <xs:restriction base="xs:string">
             <xs:maxLength value="50"  />
         </xs:restriction> 
       </xs:simpleType>
    </xs:element>
    
  • The Parent Code field is optional for an import file. The element is nested inside the parent code in the import file.
    
    <xs:element name="DOC_ID" type="xs:int" default="3792" />
    <xs:element name="PARENT_CODE" default=" " minOccurs="0">
      <xs:simpleType>
       <xs:restriction base="xs:string">
        <xs:maxLength value="20" />
       </xs:restriction>
      </xs:simpleType>
    </xs:element>