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.
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 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:
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: