The Liquid XML Objects code generator can be invoked from the command line using the LXO.exe
Usage:
LXO.exe <Flags> <Schema filenames>
LXO.exe @<Project filename>
| Command line flags | Short Form | Values | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| /Language | /l | CS VB |
Required. The target language for the generated code. |
|||||||||||||||||||||
| /GenerateVSProject | /vsp | File VS2015 VS2017 VS2019 VS2022 |
Optional. Only used if /Language = CS/VB Default VS2022 The type of .Net project to generate. Only used when Language is C# or VB.Net |
|||||||||||||||||||||
| /OutputFilename | /of | Filename | Required if GenerateVSProject = File The filename that the generated code will be written to. |
|||||||||||||||||||||
| /OutputFolder | /od | Directory Name | Required if GenerateVSProject = VS2022/VS2019/VS2017/VS2015 The folder that the generated code files will be written to. |
|||||||||||||||||||||
| /BaseClassEnabled | /cb | + - |
Optional. Default - (no base class) Generates a common base class. Custom code can be added to this which is then available in all generated classes. |
|||||||||||||||||||||
| /BaseClassName | /cbn | Valid target language class name | Optional. Only used if /BaseClassEnabled is set. The class name for the common base class. The default value is language specific. |
|||||||||||||||||||||
| /GenerationModel | /gm | Simple Conformant ConformantWithAccessors |
Optional. Default ConformantWithAccessors
|
|||||||||||||||||||||
| /DefaultOptionalAttributes | /da | + - |
Optional. Default + Properties representing attributes are generated with default values set on them. |
|||||||||||||||||||||
| /DefaultOptionalElements | /de | + - |
Optional. Default - Properties representing elements are generated with default values set on them. |
|||||||||||||||||||||
| /MixedContentHandling | /mch | TreatAsAny Ignore |
Determines how mixed content elements are dealt with.
See Mixed Content |
|||||||||||||||||||||
| /OutputNamespace | /ns | Valid target language namespace | Optional. Default 'Lx.GeneratedCode' The namespace the generated with in the target language. |
|||||||||||||||||||||
| /UnprocessedHandlers | /u | + - |
Optional. Default - Creates a container in each element to hold unprocessed elements and attributes. |
|||||||||||||||||||||
|
/RaiseChangeEvents |
/evnt |
+ |
Optional. Default - Property change and collection change events will be raised when the model is changed. Allows the model to take part in in Data Binding. |
|||||||||||||||||||||
| /CollectionNaming | /colnm |
None |
Optional. Default 'Pluralize'
|
|||||||||||||||||||||
| /GenerateSample | /smpl | + - |
Optional. Only used if /GenerateVSProject = VS2022/VS2019/VS2017/VS2015 Default - Generates sample usage code. |
|||||||||||||||||||||
| /GenerateNsRegistration | + - |
Optional. Only used if /GenerateVSProject = VS2022/VS2019/VS2017/VS2015 Default - Generates Namespace registration code. |
||||||||||||||||||||||
| /NullableRefereenceTypes | + - |
Optional. Only used if /GenerateVSProject = VS2022/VS2019 and target is C# Default - Generates nullable reference type notation. |
||||||||||||||||||||||
| /Version | /v |
+ |
Optional. Prints the application version |
|||||||||||||||||||||
| /Verbose | + - |
Optional. Default - Produces verbose output |
||||||||||||||||||||||
| /VerboseFileListing | /vfl | + - |
Optional. Default - Verbose file listing : lists all the generated files. |
|||||||||||||||||||||
| /name | /n |
Multiple optional values in the form /name:<Variable>=<Value> Set the generated names for various types
Example -n:ClsAll=ALL |
||||||||||||||||||||||
| <xsdFile> | /x | Required if the filename does not have a .xsd extension. Explicitly add an XSD Filename. |
||||||||||||||||||||||
| <dtdFile> | /d | Required if the filename does not have a .dtd extension. Explicitly add an DTD Filename. |
||||||||||||||||||||||
| <wsdlFile> | /w | Required if the filename does not have a .wsdl extension. Explicitly add an WSDL Filename. |
||||||||||||||||||||||
| /EmbeddedXsdValidator | /exsdv | + - |
Optional. Only used if /GenerateVSProject = VS2022/VS2019/VS2017/VS2015 Default + Generates an a validator based on the raw XSD schemas into the projects. |
|||||||||||||||||||||
| /VSProjectAssemblyName | /vsasm | Valid .Net assembly name | Required if /GenerateVSProject = VS2022/VS2019/VS2017/VS2015 Default + The .Net Assembly name. |
|||||||||||||||||||||
| @<file> | Optional. Read response file for more options |
|||||||||||||||||||||||
| <SourceFiles> | Required. XSD/DTD/WSDL UNC/Uri Filenames (if names don't have the correct extension then use /xsdFile:[FILENAME] /dtdFile:[FILENAME] /wsdlFile:[FILENAME]). |
| Example Usage |
Copy Code
|
|---|---|
LXO.exe /L:CS /VSP:File /OF:MyGeneratedClasses.cs MySchema1.xsd LXO.exe /L:CS /VSP:VS2022 /OD:c:\temp\MyGeneratedCode /VSASM:MyCompany.MyProject MySchema1.xsd MySchema2.xsd |
|
The LXO.exe is compatible with the .lxo project files created in the XML Data Binding Wizard. These can be used directly as follows.
| Using an XML Data Binding Wizard .lxo from the command line |
Copy Code
|
|---|---|
LXO.exe @MyXmlDataBinderProject.lxo |
|