Generate Program Code
The DTD/Schema | Generate Program Code command displays a dialog in which you can (i) select a programming language (Java, C++, or C#), for which code can be generated, (ii) specify a template to be used for the code generation, and (iii) specify certain settings for C++ and C# code generation. On clicking OK, class files of the target code language are generated from definitions in the active schema document (DTD or XML Schema).
The available settings are as follows.
C++ Settings | Defines the specific compiler settings for the C++ environment, namely:
•The Visual Studio version (2013, 2015, 2017, 2019, 2022) •Whether a makefile for Linux with GCC compiler must be generated. •The XML library (MSXML, Xerces 3.x) •Whether static or dynamic libraries must be generated •Whether code must be generated with or without MFC support
The Makefile for Linux/GCC option adds makefiles to the generated code. C++ source files are generated so that they are portable using #ifdef constructs to support different compilers and operating systems.
Note the following if you intend to compile the generated code with GCC (GNU Compiler Collection) on Linux:
•For Linux/GCC compilation, the only supported XML Library is Xerces 3.x. •Selecting the check box MFC support has no effect on compilation with Linux/GCC. |
C# Settings | Select the option Microsoft .NET Core 3.1, Microsoft .NET 5.0, or Microsoft .NET 6.0 to generate a Visual Studio solution targeting the respective platforms.
If you need to target the .NET Framework platform for a specific Visual Studio version, select any of the Microsoft Visual Studio 2010-2019 options—in this case, the generated solution will target the .NET Framework version corresponding to the respective Visual Studio version. |
See the Code Generator section for details about code generation.