• <tfoot id='7M62P'></tfoot>

        <bdo id='7M62P'></bdo><ul id='7M62P'></ul>

    1. <legend id='7M62P'><style id='7M62P'><dir id='7M62P'><q id='7M62P'></q></dir></style></legend>

        <small id='7M62P'></small><noframes id='7M62P'>

        <i id='7M62P'><tr id='7M62P'><dt id='7M62P'><q id='7M62P'><span id='7M62P'><b id='7M62P'><form id='7M62P'><ins id='7M62P'></ins><ul id='7M62P'></ul><sub id='7M62P'></sub></form><legend id='7M62P'></legend><bdo id='7M62P'><pre id='7M62P'><center id='7M62P'></center></pre></bdo></b><th id='7M62P'></th></span></q></dt></tr></i><div id='7M62P'><tfoot id='7M62P'></tfoot><dl id='7M62P'><fieldset id='7M62P'></fieldset></dl></div>
      1. 为什么 XSD.EXE 会创建两个 .XSD 文件,以及如何使

        时间:2023-06-04

      2. <tfoot id='zqe1W'></tfoot>

          <small id='zqe1W'></small><noframes id='zqe1W'>

            <tbody id='zqe1W'></tbody>
          <i id='zqe1W'><tr id='zqe1W'><dt id='zqe1W'><q id='zqe1W'><span id='zqe1W'><b id='zqe1W'><form id='zqe1W'><ins id='zqe1W'></ins><ul id='zqe1W'></ul><sub id='zqe1W'></sub></form><legend id='zqe1W'></legend><bdo id='zqe1W'><pre id='zqe1W'><center id='zqe1W'></center></pre></bdo></b><th id='zqe1W'></th></span></q></dt></tr></i><div id='zqe1W'><tfoot id='zqe1W'></tfoot><dl id='zqe1W'><fieldset id='zqe1W'></fieldset></dl></div>
        1. <legend id='zqe1W'><style id='zqe1W'><dir id='zqe1W'><q id='zqe1W'></q></dir></style></legend>

                <bdo id='zqe1W'></bdo><ul id='zqe1W'></ul>

                  本文介绍了为什么 XSD.EXE 会创建两个 .XSD 文件,以及如何使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在使用以下命令从我的输入 XML 文件生成相关的 xsd 文件——response.xml,我的困惑是(1)为什么有两个 xsd 文件输出(response.xsd 和 response_app1.xsd),我想应该只生成其中一个?(2) 如果我需要使用 xsd/classes 生成 C# 类文件,我应该使用哪个 xsd 文件?

                  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?

                  我的环境:VSTS 2008 + C# + .Net 3.5.

                  My environment: VSTS 2008 + C# + .Net 3.5.

                  D:>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:
                  esponse.xsd'.
                  

                  这是我的输入 XML 文件和输出 XSD 文件,

                  Here is my input XML file and ouput XSD files,

                  http://www.mediafire.com/file/kzzoxw0zwgq/inputoutput.zip

                  编辑 1:

                  当我执行xsd response.xsd生成相关C#类时,出现错误信息,这里是详细输出,

                  when I execute xsd response.xsd to generate related C# class, there are error messages, and here are the detailed output,

                  D:>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 /?".
                  

                  提前致谢,乔治

                  推荐答案

                  乔治,

                  要从这些文件中生成类,您必须在命令行中列出两者:

                  To generate classes from these files, you must list both on the command line:

                  D:>xsd response.xsd response_app1.xsd /classes 
                  

                  <小时>

                  已经正确地说这两个 .xsd 文件是因为您的原始 XML 文件中有两个 XML 命名空间.顺便说一句,我在这里猜测了一下,因为您没有发布 XML 文件.


                  It has already been correctly said that the two .xsd files are because there were two XML namespaces in your original XML file. BTW, I'm guessing a little here because you did not post the XML file.

                  这篇关于为什么 XSD.EXE 会创建两个 .XSD 文件,以及如何使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:从 XML 文件推断的 XmlSchema - 如何遍历 XSD 中的所有 下一篇:dataSet.GetXml() 不为 null 或空白列返回 xml

                  相关文章

                  最新文章

                  <i id='W3Bdt'><tr id='W3Bdt'><dt id='W3Bdt'><q id='W3Bdt'><span id='W3Bdt'><b id='W3Bdt'><form id='W3Bdt'><ins id='W3Bdt'></ins><ul id='W3Bdt'></ul><sub id='W3Bdt'></sub></form><legend id='W3Bdt'></legend><bdo id='W3Bdt'><pre id='W3Bdt'><center id='W3Bdt'></center></pre></bdo></b><th id='W3Bdt'></th></span></q></dt></tr></i><div id='W3Bdt'><tfoot id='W3Bdt'></tfoot><dl id='W3Bdt'><fieldset id='W3Bdt'></fieldset></dl></div>

                  <small id='W3Bdt'></small><noframes id='W3Bdt'>

                      <tfoot id='W3Bdt'></tfoot>
                    1. <legend id='W3Bdt'><style id='W3Bdt'><dir id='W3Bdt'><q id='W3Bdt'></q></dir></style></legend>

                      • <bdo id='W3Bdt'></bdo><ul id='W3Bdt'></ul>