Thursday, November 24, 2022

Lists and Arrays in XML with Liquid XML Objects

We recently received a support ticket with a question with regards to defining arrays in XML and using them within the C# code generated from Liquid XML Objects.

XML Schema (XSD)

The following demonstrates XML Schema (XSD) two ways to do this, either using an attribute list or a list of elements.

<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid Studio (>
<xs:schema elementFormDefault="qualified" xmlns:xs="">
    <xs:element name="MyData">
                <xs:element name="Name" type="xs:string" />
                <xs:element name="UIntData" type="xs:unsignedInt" minOccurs="10" maxOccurs="10" />
            <xs:attribute name="ByteData" use="required">
                    <xs:list itemType="xs:byte" />


XML Data

The following XML data is valid against the above XML Schema (XSD) and demonstrates a list of values in the ByteData attribute and a list of values as UIntData elements.

<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid Studio ( -->
<MyData xmlns:xsi="" 
        ByteData="16 -23 -125 -114 50 -14">


XML Data Binding Source Code (C#)

If you use Liquid XML Objects to generate code from the XSD, you will see the following properties in the generated code to access the array data:

// attribute list will use...
public System.SByte[] ByteData { get; set; } = new System.SByte[] {};

// element list will use...
public List<System.UInt32> UIntData { get; } = new List<System.UInt32>();

What is Liquid XML Objects?

Liquid XML Objects provides a direct replacement for Microsoft Visual Studio's xsd.exe with better XSD 1.0 standard support and support for W3C XSD 1.1.

Liquid XML Objects Features

  • Fully Integrated as a Microsoft Visual Studio extension.
  • Generates an easy to use class library for C# and Visual Basic .Net.
  • Replace xsd.exe with better XSD 1.0 support and adds support for XSD 1.1.
  • Generate simple light weight classes which follow the structure of the XML.
  • Supports .Net Core, .Net Standard and .Net Framework
  • Supports W3C XML Schema for XSD 1.0 and XSD 1.1 standards.
  • Support for the most complex XML standards.
  • Royalty free distribution of compiled code and runtime.

Download a Free Trial: 


Tuesday, November 22, 2022

New Release - Liquid Studio v20.2.0

Announcing Liquid Studio v20.2.0:

  • Added ability to set Column Data Type for Text Components in Data Mapper
  • Fixed sequence issue with XML Objects
  • Fixed issues raised by User Exception Reports
  • General Fixes

Download a Free Trial:

Monday, November 07, 2022

New Release - Liquid Studio v20.1.5

Announcing Liquid Studio v20.1.5:

  • Added validation option to resolve http and https as same file
  • Added Find functionality to Data Mapper
  • Improved Errors and Warnings in Data Mapper
  • Fixed issue in C++ XML Data Binder for handling Substitution Groups
  • General Fixes

Download a Free Trial: