Would this be the correct way of declaring that an XML element Cluster contains (1 or more instances of) a single XML element type Node:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Cluster" type="Node" minOccurs=2>
</xs:element>
<xs:element name="Node"/>
</xs:element>
</xs:schema>
The textbook that I’m studying and all the online resources that I have come across exclusively discuss more complex arrangements involving <xs:complex> , which I suspect are overkill in this case.
Actually, your XSD is riddled with all sorts of problems. Try to use a decent XSD/XML editor, it should help you more than you think.
Problems:
I would start with a sample XML, since you know that already:
Then you could use the decent tool to generate the XSD, a subject that’s more complicated than the simple XML you just visualized:
There you could see the maxOccurs, and then change it to the value you wanted. As you become more familiar with the XSD syntax, you can start edit the working XSD into something that makes more sense; in the end, the XSD inferrence may not always be crowd pleasing…