XSD Mixed Content
A mixed complex type can contain attributes, elements, and text.
Complex Type with Mixed Content
The XML element, "letter", contains text as well as other elements:
Dear Mr.
Your order
will be shipped on
The following schema declares this "letter" element:
Note: In order for character data to appear between the child elements of "letter", the mixed attribute must be set to "true".xs:sequence The tags (name, orderid, and shipdate) mean that the defined elements must appear in sequence inside the "letter" element.
We can also give the complexType element a name and let the type attribute of the "letter" element refer to this complexType name (by this method, several elements can refer to the same complex type):