Complex Type: Elements That Contain Simple Content | ||
An element that contains simple content is classified as a complex type element. For example, the XML document declaration in the code snippet on the right indicates that the EmpID element contains integer content and the country attribute. The code snippet on the right also declares the associated XML schema declaration. In this declaration, the complexType element indicates that the EmpID element is a complex type element. The simpleContent element indicates that the complexType element contains only text and attributes. A simpleContent element must contain an extension or a restriction element. The restriction element limits the base data type to the specified data type. Similarly, an extension element extends the base data type of a complexType element. |
|
|
Click the Next button to continue. |