title: Why does XSD.EXE Create Two .XSD Files, and How to Use Them?
body: <p>I am using the following command to generate related xsd file from my input XML file -- response.xml, my confusion is (1) why there are two xsd file output (response.xsd and response_app1.xsd), I think there should be only one of them generated? (2) If I need to generate C# class file by using xsd /classes, which xsd file should I use?</p>
  
  <p>My environment: VSTS 2008 + C# + .Net 3.5.</p>
  
  <pre><code>D:\&gt;xsd response.xml
  Microsoft (R) Xml Schemas/DataTypes support utility
  [Microsoft (R) .NET Framework, Version 2.0.50727.3038]
  Copyright (C) Microsoft Corporation. All rights reserved.
  Writing file 'D:\response.xsd'.
  </code></pre>
  
  <p>Here is my input XML file and ouput XSD files,</p>
  
  <p><a href="http://www.mediafire.com/file/kzzoxw0zwgq/inputoutput.zip" rel="noreferrer">http://www.mediafire.com/file/kzzoxw0zwgq/inputoutput.zip</a></p>
  
  <p>EDIT 1:</p>
  
  <p>when I execute xsd response.xsd to generate related C# class, there are error messages, and here are the detailed output,</p>
  
  <pre><code>D:\&gt;xsd response.xsd /classes
  Microsoft (R) Xml Schemas/DataTypes support utility
  [Microsoft (R) .NET Framework, Version 2.0.50727.3038]
  Copyright (C) Microsoft Corporation. All rights reserved.
  Schema validation warning: The 'http://www.mycorp.com/Order/2009/05/mex:Items' e
  lement is not declared. Line 10, position 16.
  
  Warning: Schema could not be validated. Class generation may fail or may produce
   incorrect results.
  
  Error: Error generating classes for schema 'response'.
    - The element 'http://www.mycorp.com/Order/2009/05/mex:Items' is missing.
  
  If you would like more help, please type "xsd /?".
  </code></pre>
  
  <p>thanks in advance,
  George</p>