XSD ( XSD tool / XSD.exe ) To generate .Net Class file
1) We can use XSD Tool ( Xml Schema Definition Tool ) or XSD.exe to generate class files (.cs or .vb ) as per your requirments from Typed Datasets. XSD.exe is the XML Schema Definition tool which generates XML schema or common language runtime classes from XDR, XML, and XSD files.
The file locates at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\XSD.exe
OR
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin Depends up on your version of .Net.
If you are having Express edition of ( V 2.0) then it might possible that you don’t have .Net command prompt option available in Start->Programs ,
then you have to go command prompt and goto location
“C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin”
and then type following with location of .xsd file on prompt
xsd.exe -c -l:c# C:\MyProjects\Employee\EmpTableDataSet.xsd
2 ) This tool can be also be used to generate xml schema file (.xsd) from an xml data file (.xml). Suppose we have file Catelog.xml as shown ,then we can generate XSD files as below from Command prompt.
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>xsd.exe C:\CatelogOne.Xml
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>xsd.exe C:\CatelogOne.Xml Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file ‘C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\CatelogOne.xsd’.
3 )To generate schema from a compiled class library ( .dll)
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>xsd C:\BLLTable.dll
on enter it will generate the schema of the various types present in the dll.
( Consider Class library you created in project or any other )
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>xsd C:\BLLTable.dll
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Writing file ‘C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\schema0.xsd’.


