Suggested LMX Evaluation Steps (Linux)

Below are some suggested steps for evaluating LMX under Linux.

We also have suggested steps for evaluating LMX under Windows.

  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 "examples" sub-directory of the installation.)
  4. Start Glinmx.
  5. Press the "Browse" button next to the "Base Schema File" edit box and select the schema.
  6. Copy the schema name from the "Base Schema File" edit box into the edit box next to "Output File Base Name".
  7. Remove the ".xsd" extension from the name in the "Output File Base Name" edit box.
  8. Select the "Basic Options" tab.
  9. Make sure the "Generate Test Framework .cpp File" box is checked (about half way down on the right-hand side).
  10. Press the "Compile..." button at the bottom of Glinmx.
  11. 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.
  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-directory of the installation. 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-directory of the installation. 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. Run a C++ compiler command similar to:
    g++ -o myschema myschema-main.cpp myschema.cpp lmx*.cpp
  15. This should create an executable called myschema.
  16. Run the program using the following command-line:
    myschema myschema.xml myschema-out.xml
  17. You should see that myschema-out.xml contains an XML instance similar to myschema.xml.
  18. You have now completed your first use of LMX. To evaluate further, modify 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.
  19. If you have questions, please just ask - evalsupport@codalogic.com.
Thank you for evaluating LMX.