从XML生成C#类

前端之家收集整理的这篇文章主要介绍了从XML生成C#类前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我可以从XML文件生成一个C#类吗?
是的,使用 xsd.exe
D:\temp>xsd test.xml
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework,Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'D:\temp\test.xsd'.

D:\temp>xsd test.xsd /classes
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework,Version 4.0.30319.1]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file 'D:\temp\test.cs'.

猜你在找的XML相关文章