O'Reilly logo

XML: Visual QuickStart Guide, Second Edition by Kevin Howard Goldberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Defining Complex Types

In the previous chapter, I discussed that simple type XML elements can only contain a value and not child elements or attributes. In this chapter, I will discuss complex type elements. A complex type element is one that can contain child elements, attributes, or some combination of the two.

There has been some discussion in the XML community about the intricacies of complex types, specifically, how difficult they are to understand. Even still, since you’ll want your XML document to contain more than just a root element, you’ll at least need one complex type element to allow the root element to have a child element of its own. Another important reason to use complex types in your XML Schema is to allow elements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required