XML Schema Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 4.00

Complex Element Declaration

This chapter provides notes and tutorial examples on complex element declarations. Topics include declaring XML elements that includes or excludes text content, sub elements or attributes; defining complexType datatypes with simpleContent or complexContent using anyType as the base datatype.

Complex Element vs. Simple Element

Declaring Empty Elements

Declaring Simple Elements

Declaring Complex Elements with Simple Content

Declaring Complex Elements with Attributes Only

Declaring Complex Elements with Sub Elements Only

Declaring Complex Elements with Attributes and Sub Elements

Declaring Complex Elements with Attributes, Sub Elements and Text Content

Using Shorthand for "complexContent" with "restriction"

Dr. Herong Yang, updated in 2007
Complex Element Declaration