The best XML Schema complex type - mixed content Tutorial In 2024, In this tutorial you can learn Complex type with mixed content,
Mixed composite type may contain attributes, elements and text.
XML element, "letter", containing text, and other elements:
The following schema declares this "letter" element:
Note: To make the character data can appear between the "letter" of the sub-elements, mixed attribute must be set to "true".<Xs: sequence> element tag (name, orderid and shipdate) means that the definition must appear in sequence within the "letter" element.
We can also give a name for the complexType element, and let the "letter" element type attribute references the complexType name (by this method, several elements can refer to the same complex type):