Liquid XML Data Binder 2021
Liquid XML Data Binder (C++, Java, VB6) / Examples / Sample : Simple Sequence
In This Topic
    Sample : Simple Sequence
    In This Topic
    Summary
    This sample shows an element containing a sequence of simple elements and attributes.

    Details
    The Element DVD contains a sequence of simple elements (simple because they are represented by primitives). All of these elements are required, and they must appear in the correct order. In addition the DVD element contains 2 attributes Genre and Cost. Genre is optional, Cost is Mandatory. Because Genre is optional, and contains primitive data, an IsValidGenre method is added to the generated DVD object. This allows you to determin if Genre was set or not. The generated classes take car of outputing the child elements in the correct order.

    XSD Source Files
     SimpleSequence.xsd
     Schema Diagrams

    Sample Name Description C++ C# Java VB.Net VB6
    Missing Optional Elements The sample demonstrates the element with some of the optional elements missing. Note Genre is an optional primitive, so we should check it using the IsValid flag before accessing it Example   Example   Example   Example   Example  
    Included Optional Elements The sample demonstrates the element with all of the optional elements present. Note Genre is an optional primitive, so we should check it using the IsValid flag before accessing it Example   Example   Example   Example   Example  

    Main Menu