Schema Central > XML Schema 1.1 > xsd:string
Advanced search
Need XML Help?

Recommended Reading:

Definitive XML Schema

 

Web Service Contract Design and Versioning for SOA

 

Advanced XML Applications

 

xsd:string

The type xsd:string represents a character string that may contain any Unicode character allowed by XML. Certain characters, namely the "less than" symbol (<) and the ampersand (&), must be escaped (using the entities &lt; and &amp;, respectively) when used in strings in XML instances.

The xsd:string type has a whiteSpace facet of preserve, which means that all whitespace characters (spaces, tabs, carriage returns, and line feeds) are preserved by the processor. This is in contrast to two types derived from it: normalizedString, and token.

Simple Type Information

Namespace: http://www.w3.org/2001/XMLSchema

Schema Document: builtintypes.xsd

Content

Examples

Valid valuesComment
This is a string!
Édition française.
12.5
an empty string is valid
PB&amp;Jwhen parsed, it will become "PB&J"
   Separated by 3 spaces.
This
is on two lines.
Invalid valuesComment
AT&Tampersand must be escaped
3 < 4the "less than" symbol must be escaped

Type Inheritance Chain

Site developed and hosted by Datypic, Inc.

Please report errors or comments about this site to contrib@functx.com