Liquid XML Data Binder (C++, Java, VB6) / Examples / Simple Sequence / Example Usage / Missing Optional Elements / VB.Net Sample : Simple Sequence
In This Topic
    VB.Net Sample : Simple Sequence
    In This Topic
    Schema Summary
    This sample shows an element containing a sequence of simple elements and attributes.

    Schema 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 determine if Genre was set or not. The generated classes take car of outputting the child elements in the correct order.

    Sample Description
    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

    Sample XML File

     Sample1.xml

    Sample Code
     Read Sample
     Write Sample

    XSD Source Files
     SimpleSequence.xsd
     Schema Diagrams

    Generated Files
     DVD.vb

    Main Menu Samples List