string

The string datatype is a primitive datatype used to represent strings of characters. The character is considered the atomic unit of a string, and what constitutes a character is defined in the XML 1.0 Recommendation. The value set for a string will be dependent on the character set being used in the XML document, just as the characters in the English alphabet are different from the characters in the Russian alphabet.

The constraining attributes that can be used with the string datatype are

  • length

  • minLength

  • maxLength

  • pattern

  • enumeration

Properties such as these that make up the characteristics of types are known as facets. Facets are expressed and manipulated with types as attributes, and changing the value of the attribute changes the limitations ...

Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.