Liquid XML Data Binder (C++, Java, VB6) / Examples / Simple Hierarchy / Example Usage / Collections in a choice / VB.Net Sample : Simple Hierarchy
In This Topic
    VB.Net Sample : Simple Hierarchy
    In This Topic
    Schema Summary
    This sample shows a number of elements within a Hierarchy. It includes local (anonymous) & global complex types. It also shows how collections are manipulated within sequences & choices.

    Schema Details
    This schema contains 2 globally defined elements AddressType, ItemType and Invoice. All of these objects can be used as the documentElement (root element) in a valid XML document.
    The Invoice object also contains a sequence, the sequence contains a number of child elements;
    InvoiceNo is a primitive
    DeliveryAddress is a element that conforms to the global element AddressType.
    BillingAddress is an optional (the corresponding property on the Invoice object may contain a null because of this) element that conforms to the global element AddressType.
    Item is a collection of elements conforming to the global element ItemType.
    Payment is a locally defined element, it in turn contains a choice of; an element 'VISA' or a collection of 'Vouchers' elements or an element 'Cash' which is untyped within the schema, and represented as a string within the generated code.


    Sample Description
    The sample builds on the previous sample, and demonstrates how to deal with a choice that contains a collection of elements.

    Sample XML File

     Sample2.xml

    Sample Code
     Read Sample
     Write Sample

    XSD Source Files
     SimpleHierarchy.xsd
     Schema Diagrams

    Generated Files
     AddressType.vb
     Invoice.vb
     Payment.vb
     VISA.vb
     Vouchers.vb
     ItemType.vb

    Main Menu Samples List