Skip to content
uencoder

XML Schema (XSD)

XSD (XML Schema Definition) defines the types, elements, attributes, and constraints of XML documents in XML syntax; it is the modern replacement for DTD.

Purpose

To provide rich type-system and structural validation for XML documents, supporting namespaces and type inheritance.

Mechanism

<xs:element>, <xs:complexType>, and <xs:simpleType> define elements and types. <xs:restriction> constrains value ranges, and <xs:sequence>/<xs:choice> define content models. Namespaces and type derivation are supported.

Use cases

  • XML web service contracts
  • SOAP message validation
  • Data exchange standards

Related tools

References