O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

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

Data types

The XML Schema standard includes a large number of data types (beyond those introduced in the previous chapter, needed for backward compatibility with DTDs). The following table shows all of the simple types, whether or not they are ordered types that have minimum and maximum possible values (leading and trailing '…' indicates no specified limits), and an example of the type in use:

Simple type Ordered type Min and max values Examples
string - -
<note>

this    is    a

    string    </note>
normalizedString - - name="J Smith"
token - - colour="red"
byte Y -128 -127 … -1 0 1 … 126 127 -13 or 99
unsignedByte Y 1 2 … 254 255 age="77"
base64Binary - - GpM7
hexBinary - - <image>FF008B7C22F6</image>
integer Y …. -2 -1 0 1 2 … hourFromUTC="-2"
positiveInteger ...

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