Suggested LMX Evaluation Steps (Windows)

Below are some suggested steps for evaluating LMX under Windows.

We also have suggested steps for evaluating LMX under Linux.

  1. If you haven't already, download and install LMX from https://codalogic.com/lmx/download.php.
  2. Create a new directory in which you can start the evaluation.
  3. Copy a simple XML schema file, and a file containing an XML instance of the schema to the directory. These files will be referred to as myschema.xsd and myschema.xml below, but you can call them what you like. (We suggest using a simple, single-file schema to start with so that you can focus on the LMX aspects rather than the details of the schema. If you wish, you can use user-preferences.xsd schema and user-preferences.xml instance which are provided as part of the installation. They are typically installed in the C:\Program Files\LMX\examples directory.)
  4. Start WinLMX.
  5. Drag the myschema.xsd file (using Windows Explorer) over the WinLMX application.
  6. Select the 'Basic Options' tab in WinLMX.
  7. Make sure the 'Generate Test Framework File (-tframework)' checkbox is checked (it is towards the top-right of the options). (This causes myschema-main.cpp to be generated - see below.)
  8. Press the 'Compile...' button in WinLMX.
  9. Assuming your schema has compiled correctly, this should have generated the following files: myschema.h, myschema.cpp, myschema-main.cpp and myschema.html. The main marshalling and unmarshalling code is contained in the myschema.h and myschema.cpp files. myschema-main.cpp includes a main() function and code to unmarshal an XML instance from a file into objects and then marshal the objects back into another file.
  10. Run-up your IDE and create a new Console project for the evaluation.
  11. Move the files myschema.h, myschema.cpp, myschema-main.cpp into the project.
  12. An LMX project needs access to some additional Runtime Supporting Software that includes the low-level XML parser and type classes. The .h header files for this code are contained in the supporting-software\include sub-folder of the installation (by default C:\Program Files\LMX\supporting-software\include). The simplest way to do this for evaluation purposes is to copy the files lmxuser.h, lmxinternals.h, lmxparse.h, lmxtypes.h, lmxregex.h and lumxunicode.h into the directory containing your generated code.
  13. The .cpp files for the Runtime Supporting Software are contained in the supporting-software\src sub-folder of the installation (by default C:\Program Files\LMX\supporting-software\src). You can build these into various forms of library, but for evaluation purposes the easiest thing to do is copy the files lmxparse.cpp, lmxtypes.cpp, lmxregex.cpp and lmxunicode.cpp into the directory containing your generated code.
  14. Add the Runtime Supporting Software .h and .cpp files to the project in the IDE.
  15. Compile the project using the IDE.
  16. Modify the development environment's settings so that when the program is run it is given the following arguments: myschema.xml myschema-out.xml
  17. Run the program.
  18. You should see that myschema-out.xml contains an XML instance similar to myschema.xml.
  19. You have now completed your first use of LMX. To evaluate further, modify the the code in myschema-main.cpp to interact with the generated classes, for example printing out specific values to the screen, or setting certain values before the data is marshalled to the myschema-out.xml file. Looking at myschema.html should help with this, as should looking at the example at https://www.codalogic.com/lmx/lmx-example.zip. You can also add more to the schema file, or try more complex schemas.
  20. If you have questions, please just ask - evalsupport@codalogic.com.
Thank you for evaluating LMX.