I\'m new to XSD, and I\'m quite confused as to when to use attribute, and when to use element?
Why cant we specify minOccurs and maxOccurs in attribute?
Also
An element is an XML node - and it can contain other nodes, or attributes. It can be a simple type or a complex type. It is an XML entity.
An attribute is a descriptor. It can't contain anything and can only be a simple type.
Have a look at this. Of course, you can just google something like "XML element vs attribute"