Easy Tutorial
❮ Schema El Attribute El Anyattribute ❯

"Element-Only" Complex Type Elements are elements that can only contain other elements.


Element-Only Complex Type

An XML element, "person", which only contains other elements:

You can define the "person" element in the schema like this:

Please note this

Or you can give the complexType element a name and have the "person" element's type attribute reference this name (using this method, multiple elements can reference the same complex type):

❮ Schema El Attribute El Anyattribute ❯