Liquid XML Data Binder 2020
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

    Example Usage
    Copy Code
    LXO.exe /L:CS /VSP:VS2017 /OD:"c:\temp\QuickStart\QuickStartCs" /GM:Simple /VSASM:"QuickStartLib" c:\temp\QuickStart\BookStore.xsd" /Verbose
    
    Use : to separate flags from parameter values, e.g. /Language:CS

    Command line flags Use Values Description
    /Language /l Required CS
    VB
    The target language for the generated code.
    /GenerateVSProject /vsp Optional
    Only used when /Language=CS/VB
    Default VS2017
    File
    VS2015
    VS2017
    The type of .Net project to generate. Only used when Language is C# or VB.Net
    /OutputFilename /of

    Required when
    GenerateVSProject = File

    Filename The filename that the generated code will be written to.
    /OutputFolder /od

    Required when
    GenerateVSProject = VS2015/VS2017

    Directory Name The folder that the generated code files will be written
    /GenerationModel /gm Optional
    Default ConformantWithAccessors
    Simple
    Conformant
    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

    /OutputNamespace /ns Optional
    Default 'Lx.GeneratedCode'
    Valid target language namespace The namespace the generated with in the target language.
    /CollectionNaming /colnm Optional
    Default 'Pluralize'

    None
    AppendS
    AppendCol
    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.

    /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.
    /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 Optional
    Only used when /BaseClassEnabled is set
    Valid target language class name The class name for the common base class.
    The default value is language specific.
    /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.
    /UnprocessedHandlers /u Optional
    Default -
    +
    -
    Creates a container in each element to hold unprocessed elements and attributes.
    /EmbeddedXsdValidator /exsdv Optional
    Only used when /GenerateVSProject = VS2015/VS2017
    Default +
    +
    -
    Generates an a validator based on the raw XSD schemas into the projects.
    /VSProjectAssemblyName /vsasm Required when /GenerateVSProject = VS2015/VS2017
    Default +
    Valid .Net assembly name The .Net Assembly name.
    /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

    /Verbose Optional
    Default -
    +
    -
    Produces verbose output
    /VerboseFileListing /vfl Optional
    Default -
    +
    -
    Verbose file listing : lists all the generated files.
    @<file>   Optional Read response file for more options
    <XsdFile>  Required
    One or more filenames
    XSD Filenames (UNC/Uri names c:\schema.xsd or http://server/schema.xsd).

     

     

    The LXO.exe is compatible with the .lxo project files created in the XML Data Binder. These can be used directly as follows.

    Using an XML Data Binder .lxo from the command line
    Copy Code
    LXO.exe @MyXmlDataBinderProject.lxo