Xsd.exe通过它生成运行XML的错误? [英] Xsd.exe generates an error running an XML through it?
问题描述
我遇到了一个xml文件的问题,我在命令提示符下运行xsd.exe。错误是 - 无法向DataTable'Data'添加约束,这是嵌套关系中的子表。
我的xml是从另一个软件程序生成的L5X(只是他们对xml的花哨谈话)和我在这里运行的其他文件没有来自同一来源的问题(虽然不同的项目)
我尝试过:
有一个在谷歌上刮,似乎其他人有类似的问题,但到目前为止没有答案。
如果我打开visual studio我可以打开有问题的xml文件从工具栏中选择xml / create schema,输出文件是完美的,并且可以顺利运行我的其余过程。我假设visual studio只是从运行时运行xsd.exe,当我按下推断架构按钮所以纠正我错误但我认为我在运行xsd.exe时缺少一些选项开关
作为参考,我在提示符处使用的命令是
xsd.exe nameoffile.xml,这通常会导致nameoffile.xsd输出与exe相同的目录。
在一天结束时我所需要的是一个可执行文件,当给出一个xml时可以抽出xsd所以我可以处理xsd在我的代码中更进一步。如果您有任何建议我会欢迎他们。
需要进一步的信息只需要询问
谢谢
I am running into a problem with an xml file that I run through xsd.exe at the command prompt. The error is - Cannot add constraint to DataTable 'Data' which is a child table in to nested relations.
My xml is produced from another software program as an L5X (just their fancy talk for xml) and other files I have ran through here without issue from the same source (albeit different projects)
What I have tried:
Had a scratch around on google, it appears other people had a similar problem but no answers thus far posted.
If I open visual studio I can open the xml file in question and select xml/create schema from the toolbar the output file is perfect and runs through the rest of my process without a hitch. I assume that visual studio is just running xsd.exe from runtime when I press that infer schema button so correct me im wrong but I assume I am missing some option switch when I run the xsd.exe
For reference the command I use at the prompt is
xsd.exe nameoffile.xml and that usually results in a nameoffile.xsd output in the same directory as the exe.
At the end of the day all I need is an executable that can pump out an xsd when given an xml so I can process the xsd further in my code. If you have any suggestions I would welcome them.
Any further info required just ask
Thanks
推荐答案
对于它的价值,运行这里的简单SQL / XML验证示例步骤:
For what it's worth, running through the simple SQL/XML validation example steps found here:
ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_2devguide/html/970e4553-b41d-4a12-ad50-0ee65d1f305d.htm
可能有助于阐明为什么会出现问题认为他们是...当他们根本没有发生在那里时。另一个有用的链接可能在这里:
[ sqlxml4sp1 ]
might serve to elucidate why problems are happening where you think they are ... when they aren't actually happening there at all. Another useful link might be here:
[sqlxml4sp1]
这篇关于Xsd.exe通过它生成运行XML的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!