The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,867 other followers

Archive for September 4th, 2009

.NET – Delphi Prism – How to generate wrapper classes code from XSD file

Posted by jpluimers on 2009/09/04

I do a lot of .NET work; most in C#, but also some in Delphi Prism (which like C#, VB.NET and other languages integrate in the Visual Studio Shell).

Both Visual Studio and the .NET Framework SDK include a nifty tool called XSD.EXE.

XSD.EXE allows you you to generate the code for wrapper classes from your XSD or other schema definition file, both for regular classes (that you can use for XML Serialization) as well as for typed dataset classes.

You need to specify the Oxygene language to generate Delphi Prism code.

A sample batch-file is here:

xsd /classes /language:Oxygene /namespace:xokumClasses xokum.xsd
rename xokum.pas xokumClasses.pas

xsd /dataset /language:Oxygene /namespace:XokumDataset xokum.xsd
rename xokum.pas xokumDataset.pas

Thanks to Peter Nowotnick who posted this answer at Stackoverflow!


Posted in .NET, CommandLine, Delphi, Development, Pingback, Prism, Software Development, Stackoverflow, Visual Studio and tools, XML/XSD, XSD | 4 Comments »

%d bloggers like this: