title: How to change the format of XML schema I get from SQL server
body: <p>I have a query:</p>
  
  <pre><code>SELECT top 0 * FROM sometable FOR XML AUTO, ELEMENTS, XMLSCHEMA ('MyURI')
  </code></pre>
  
  <p>This query returns a schema:</p>
  
  <pre><code>&lt;xsd:element name="ClientName"&gt;
    &lt;xsd:simpleType&gt;
      &lt;xsd:restriction base="sqltypes:nvarchar" sqltypes:localeId="1033" sqltypes:sqlCompareOptions="IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId="52"&gt;
        &lt;xsd:maxLength value="50" /&gt; 
      &lt;/xsd:restriction&gt;
    &lt;/xsd:simpleType&gt;
  &lt;/xsd:element&gt;
  </code></pre>
  
  <p>but I want something more like this:</p>
  
  <pre><code>&lt;xsd:element name="ClientName"&gt;
    &lt;xsd:simpleType&gt;
     &lt;xsd:restriction base="xsd:string"&gt;
       &lt;xsd:maxLength value="50" /&gt; 
     &lt;/xsd:restriction&gt;
    &lt;/xsd:simpleType&gt;
  &lt;/xsd:element&gt;
  </code></pre>
  
  <p>How can I achieve this?</p>