Home > Articles > Web Services > XML

  • Print
  • + Share This
From the author of

Mixed Content

A complex type can specify mixed content. Mixed content means that an element whose element type's structure type is this complex type can contain text interspersed with elements. The text is always free form (there is no way to specify constraints on the text). The elements are typically partially confined, as would be the case in normal complex content. The following catalogEntryDescriptionType permits valid lists of part numbers to be interspersed with text:

<xsd:complexType name="catalogEntryDescriptionType"
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
    <xsd:element name="partList"

The XML representation of an element type whose structure type is catalogEntryDescription might look like the following element:

<xsd:element name="description"

Given the preceding element type, the following description element is valid in an XML instance:

  This is made up of both
  <partList>UX002 UX003</partList>
  pieces which makes this assembly
  better than
  and better than the competition.
  • + Share This
  • 🔖 Save To Your Account