Liquid XML Data Binder 2020
Liquid XML Objects (C#, Visual Basic .Net) / Code Generation / Visual Studio / Visual Studio Code Generation Options
In This Topic
    Visual Studio Code Generation Options
    In This Topic

    Name Default Description
    Auto Regenerate true When 'true' changes to other Liquid XML Objects settings will trigger code re-generation. On large schemas this may take to long, so for performance reasons it may be better to turn this off. See Manual Code Re-Generation.

    Add XSD Validation Code

    true

    Adds the source XSD files as resources and creates a class that will load them into a schema set so they can be used for validation.
    Only availbile for XSD 1.0 schemas.

    XSD Validation Resource Folder

    The folder where the source XSD schemas are stored as resources (only used if 'Add XSD Validation Code' is true).

    XSD Validation Class name

    The name of the class generated that will provide access to the compiled XSD schemas for validation (only used if 'Add XSD Validation Code' is true).

    Handle unknown nodes

    false

    Creates handlers to deal with elements and attributes that are unexpected within the XML file. These would cause the XML to be invalid against the XSD schema, but can typically be handled.

    Use default attribute values

    true

    If an attribute has a default value specified in the schema then an entry is automatically added with the given default value even when the attribute is optional.

    Use default element values

    false

    If an element is optional and a default value is specified in the schema then an entry is automatically added with the given default value when the a new object is created.

    Generate a common base class

    false

    Forces the creation of a common base class for all classes.

    Base class name

    LxBase

    If a common base class is generated, then this is the name of the class

    Add source location comments

    true

    Writes the location source XSD filename and line number of the xsd node that cause the generated of each given class.

    Write Errors

    Warnings

    Determines how errors found in the XSDs are written into the generated code.

    • 'None' : no errors/warnings written.
    • 'Warning' : errors and warnings are written as #warning.
    • 'Error' : errors and warnings are written as #error/#warning respectively.

    Namespace prefix map

    The prefixes used to declare namespaces within the output XML

    Generation Model

    High Conformance + Simple Accessors

    Determines the way in which the XSD is converted to code.

    Has a significant effect on the generated code, and the accuracy of the XML created.

    • 'Simplified Model' : Collapses all the child elements into the containing element. This produces very simple code for reading and writing XML data. However the cardinality and order of the child elements may not be respected.
    • 'High Conformance Model' : The structure of the XSD is mirrored in the generated code. The generated code produces XML that is extremely compliant with the source XSD, allowing fine control over the output XML. In order to accomplish this level of control the generated code is more verbose, meaning a little more code is required to use it.
    • 'High Conformance + Simple Accessors' : The generated code is exactly the same as that generated with the 'High Conformance Model', but additional readonly accessors are generated making it possible to read data from the generated classes in the same way as you would the 'Simplified Model', but writing to the model is still more involved requiring a little extra code.

    See Code Generation Models

    xs:sequence property name

    Seq

    The name used for xs:sequence properties in the generated classes

    xs:choice property name

    Chc

    The name used for xs:choice properties in the generated classes

    xs:all property name

    All

    The name used for xs:all properties in the generated classes

    xs:sequence class name

    Seq

    The name used to name the xs:sequence generated classes

    xs:choice class name

    Chc

    The name used to name the xs:choice generated classes

    xs:all class name

    All

    The name used to name the xs:all generated classes

    xs:any default name The name of the element created for a required xs:any. If this is left blank then the element name property is left empty/null and the calling code must set the value before it is  serialized.