惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - wu.g.q

旧电脑适合的系统 安川机器人遇见的问题汇总 Estun机器人数据断电保持问题解决方案 安川机器人快捷键 安川机器人变量代替常量的转换关系 创建自己的代码仓库 vc6.0 txt文件资源转为xaml资源 查看Windows操作系统编码方式 wpf 元素设置焦点无效的问题 汽车知识总结 wpf - 设置滚动条拇指(Thumb)大小 C# 反序列化乱码 C# 确定文件编码格式的方法 C# 反序列化报错 XML 文档(1, 2)中有错误:不应有 <xml xmlns=''> C# 获取XML文件内容的多种方式 VC6.0 dll debug C#与C++动态链接库DLL参数互传 C#调用C/C++动态库dll异常:对 PInvoke 函数调用导致堆栈不对称问题 C#动态调用C/C++的DLL
xsd.exe语法示例
wu.g.q · 2023-08-01 · via 博客园 - wu.g.q

xsd.exe语法示例

一般情况下,xsd.exe位于C:/Program Files/Microsoft Visual Studio 8/SDK/v2.0/Bin

1、将xsd文件自成.CS类库。

xsd.exe /d /l:C# a.xsd /n:Namespace1.Namespace2

/d 指令指示该工具生成 DataSet,

/l: 告诉该工具要使用哪种语言(例如 C# 或 Visual Basic .NET)。可选的

/n: 指令指示该工具另外为 DataSet 生成名为 XSDSchema.Namespace 的命名空间。该命令的输出为 XSDSchemaFileName.cs

2、 csc.exe /t:library XSDSchemaFileName.cs /r:System.dll /r:System.Data.dll /t: 指令指示该工具编译成库,

/r: 指令指定进行编译所需的依赖库。该命令的输出为 XSDSchemaFileName.dll,它可以在使用

/r: 指令编译 ADO.NET 应用程序时传递到编译器

一、 如何将.xsn文件转成.cs文件。

用infopath打开.xsn文件,在文件-另存为源码,保存后,将会有一系列的文件,将myschema.xsd文件和xsd.exe文件放在同一目录下,在DOS窗口上运行:

xsd.exe /d /l:C# myschema.xsd /n:Namespace1.Namespace2

就会生成一个myschema.cs文件,部分代码如下:

//------------------------------------------------------------------------------

// <auto-generated>

// 此代码由工具生成。

// 运行库版本:2.0.50727.42

//

// 对此文件的更改可能会导致不正确的行为,并且如果

// 重新生成代码,这些更改将会丢失。

// </auto-generated>

//------------------------------------------------------------------------------

//

// This source code was auto-generated by xsd, Version=2.0.50727.42.

//

namespace Namespace1.Namespace2 {

using System;

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]

[Serializable()]

[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.ComponentModel.ToolboxItem(true)]

[System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]

[System.Xml.Serialization.XmlRootAttribute("NewDataSet")]

[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]

public partial class NewDataSet : System.Data.DataSet {

。。。。。。。。。。。

二、Xsd

xsd.exe myschema.xsd /c /o:"c:/infopath"

或者xsd.exe myschema.xsd /c /o:

原文链接:https://blog.csdn.net/xjzdr/article/details/2580523