Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Schemas

Defining Complex Types

Definitions of complex types are created using the complexType element, its attributes, and any valid facets. Usually, complex types will contain a set of element declarations, attribute declarations, and element references.

Example

The following example creates a complex type definition for the Client element to describe the content model.

<xs:element name="Client">
  <xs:complexType>
    <xs:attribute name="CompanyName" type="xs:string"/>
    <xs:attribute name="City" type="xs:string"/>
    <xs:attribute name="State" type="xs:string"/>
  </xs:complexType>
</xs:element>

See Also

Content Models