title: Convert XSD (XML Schema) to AVSC (Avro Schema) using Python
body: <p>I am working on converting huge xml files to avro format, and as a part of this I will have to use the XSD schema to generate Avro file schema - using Python (preferably). I cannot find any valid resources for this conversion. Can the community please help me with this ? </p>
  
  <p>Following is the sample format of XSD file:</p>
  
  <pre><code>&lt;xsd:complexType name="tablename"&gt;
  - &lt;xsd:sequence&gt;
    &lt;xsd:element name="column1" type="String38" /&gt; 
    &lt;xsd:element name="column2" type="String255" /&gt; 
    &lt;xsd:element name="column3" type="String255" minOccurs="0" /&gt; 
    &lt;xsd:element name="column4" type="ValidDate" minOccurs="0" /&gt; 
  &lt;/xsd:sequence&gt;
  &lt;xsd:attribute name="schemaVersion" type="xsd:string" use="required" /&gt; 
  &lt;/xsd:complexType&gt;
  </code></pre>