XSD list property example
If the possibility exists for a child element name to appear multiple times, the property becomes a list-based property.
Example XSD
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Element1">
<xsd:complexType>
<xsd:choice>
<xsd:element name="Child1" type="xsd:int"/>
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="Child2" type="xsd:int"/>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>Code
var xml = new schema.Element1()
xml.Child1 = 1
xml.print()
print( "----------" )
xml.Child1 = null
xml.Child2 = {1, 2, 3, 4}
xml.print()Output
<?xml version="1.0"?>
<Element1>
<Child1>1</Child1>
</Element1>
----------
<?xml version="1.0"?>
<Element1>
<Child2>1</Child2>
<Child2>2</Child2>
<Child2>3</Child2>
<Child2>4</Child2>
</Element1>
