I have a created the below schema where product is a array , but the XSD validation(in eclipse) says maxOccurs="unbounded" minOccurs="0" cannot be used at the root element. So how to represent this structure in XSD. Below is how my XSD looks.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element maxOccurs="unbounded" minOccurs="0" name="product">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" name="id" type="xs:decimal"/>
<xs:element minOccurs="1" name="name" type="xs:string"/>
<xs:element minOccurs="1" name="price">
<xs:simpleType>
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="tags" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>