XSD: difference between Element and Attribute
问题 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, why is it we cannot specify use="required" in element? 回答1: An element is an XML element - a opening tag, some content, a closing tag - they are the building blocks of your XML document: <test>someValue</test> Here, "test" would be an element. Attributes is an additional info on a tag - it's an "add-on" or an extra info on an element, but