Liquid XML Data Binder
Liquid XML Data Binding Wizard / Command Line / Command Line Code Generation
In This Topic
    Command Line Code Generation
    In This Topic

    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>

    Use : to separate flags from parameter values, e.g. /Language:CS
    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
    Determines the model used for generating the Liquid XML Objects code.

    • Conformant - High accuracy model, but resulting model is more complex for reading and writing
    • ConformantWithAccessors - High accuracy model with simple read only accessors, resulting model is more complex for writing
    • Simple - Simple model, simple for reading and writing, but output XML Elements order and cardinality may not be observed

    See Code Generation Models

    /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.
    /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
    AppendS
    AppendCol
    Pluralize

    Optional. Default 'Pluralize'
    Determines how collections of objects are named:

    • None - Collection names are the same as they are in the source schema.
    • AppendS - The source schema name with an 's' appended.
    • AppendCol - The source schema name with a 'Col' appended.
    • Pluralize - A pluralized version of the source schema name (i.e. 'property' would become 'properties'), works best when the schema is in English.
    /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.
    /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

    Variable Default Value Description
    ClsSeq Seq The name of a class generated for a xs:sequence
    ClsChc Chc The name of a class generated for a xs:choice 
    ClsAll All The name of a class generated for a xs:all
    PrpSeq Seq The name of a property to access a xs:sequence 
    PrpChc Chc The name of a property to access a xs:choice
    PrpAll All The name of a property to access a xs:all

    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
    

    Project Files

    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