Can someone please remind me how to create a .Net class from an XML file?
I would prefer the batch commands, or a way to integrate it into the shell.
Thanks!
Can someone please remind me how to create a .Net class from an XML file?
I would prefer the batch commands, or a way to integrate it into the shell.
Thanks!
You might be able to use the xsd.exe tool to generate a class, otherwise you probably have to implement a custom solution against your XML
The below batch will create a .Net Class from XML in the current directory.
So... XML -> XSD -> VB
(Feel free to substitute CS for Language)
Create a Convert2Class.Bat in the %UserProfile%\SendTo directory.
Then copy/save the below:
@Echo off
Set XsdExePath="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\XSD.exe"
Set Language=VB
%~d1
CD %~d1%~p1
%XsdExePath% "%~n1.xml" /nologo
%XsdExePath% "%~n1.xsd" /nologo /c /language:%Language%
Works on my machine - Good Luck!!