Text

A sequence of characters, or text, makes up an XML document. Text consists of both markup and character data (element content).

Productions

[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
1.0
[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] 1.1
[2a] RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] |
[#x86-#x9F] 1.1
[3] S ::= (#x20 | #x9 | #xD | #xA)+
[4] NameChar::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
1.0
[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] |
[#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] |
[#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] |
[#x10000-#xEFFFF] 1.1
[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] |
[#x203F-#x2040] 1.1
[5] Name::= (Letter | '_' | ':') (NameChar)* 1.0
[5] Name ::= NameStartChar (NameChar)* 1.1
[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)

Examples

<messages>
 <msg>This element contains a message.</msg>
</messages>

Description

A character in XML is considered an atomic unit of text. Legal characters include the tab, the carriage return, the line feed, and the legal characters of Unicode and ISO/IEC 10646. Text classed as markup consists of element start-tags (including attributes), end-tags, empty-element tags, entity and character references, comments, CDATA section delimiters, XML declarations, text declarations, processing instructions, ...

Get XML Pocket Reference, 3rd 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.