Note that there are some explanatory texts on larger screens.

plurals
  1. PODifferent .xsd using xsd.exe and VisualStudio->Xml->CreateSchema
    primarykey
    data
    text
    <p>I have foo.xml, I would like to generate foo.xsd as it is generated with VisualStudio->Xml->CreateSchema, tried xsd.exe but results are not the same. (<code>xsd.exe foo.xml</code>)</p> <p>How to call same command as VisualStudio->Xml->CreateSchema from command line?</p> <p>Maybe one small example will help, notce <code>type="xs:string" minOccurs="0"</code> When xml is more complexed differences become huge.</p> <p>xml:</p> <pre><code>&lt;foo&gt; &lt;x /&gt; &lt;y /&gt; &lt;/foo&gt; </code></pre> <p>VS:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; &lt;xs:element name="foo"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="x" /&gt; &lt;xs:element name="y" /&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:schema&gt; </code></pre> <p>xsd.exe</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt; &lt;xs:element name="foo"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="x" type="xs:string" minOccurs="0" /&gt; &lt;xs:element name="y" type="xs:string" minOccurs="0" /&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"&gt; &lt;xs:complexType&gt; &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt; &lt;xs:element ref="foo" /&gt; &lt;/xs:choice&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:schema&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload