XML 1.0
Unicode code points in the following ranges are valid in XML 1.0 documents: * U+0009, U+000A, U+000D: these are the only C0 controls accepted in XML 1.0; * U+0020–U+D7FF, U+E000–U+FFFD: this excludes ''some'' (not all) non-characters in the BMP (allXML 1.1
Unicode code points in the following code point ranges are always valid in XML 1.1 documents: * U+0001–U+D7FF, U+E000–U+FFFD: this includes most C0 and C1 control characters, but excludes ''some'' (not all) non-characters in the BMP (surrogates, U+FFFE and U+FFFF are forbidden); * U+10000–U+10FFFF: this includes ''all'' code points in supplementary planes, including non-characters. The preceding code points ranges contain the following controls which are only valid in certain contexts in XML 1.1 documents, and whose usage is restricted and highly discouraged: * U+0001–U+0008, U+000B–U+000C, U+000E–U+001F: this includes ''most'' (not all) C0 control characters * U+007F–U+0084, U+0086–U+009F: this includes a C0 control character, and all but one C1 control.Characters allowed but discouraged
In addition, the following code points, even though they are valid in all XML 1.0 and XML 1.1 documents, are also restricted and discouraged in both versions of XML, as they are permanently assigned to non-characters in Unicode and ISO/IEC 10646. Some XML parsers may even signal them as invalid in their character set decoder, and XML documents containing them may not pass through some restricted interfaces or may not be interchangeable. These non-characters can still be encoded in standard UTFs (such asNon-restricted characters
For these reasons, the non-restricted repertoire which can be used in all versions of XML and in all contexts (as permitted by the XML syntax) contains only code points that are permanently assigned to characters (excluding non-characters), or reserved for possible future encoding in Unicode and ISO/IEC 10646, and excludes the restricted repertoire, for better interoperability. They are: * U+0009, U+000A, U+000D: these are the only C0 control characters accepted in both XML 1.0 and XML 1.1 (they are treated as whitespaces or line-breaks in many contexts); * U+0020–U+007E: these are all the non-control characters in the Basic Latin block (the "graphic" subset of US-ASCII), and excludes the last C0 control; * U+0085: this is the only C1 control character accepted in both XML 1.0 and XML 1.1 (it is treated as whitespace or line-break in many contexts); * U+00A0–U+D7FF, U+E000–U+FDCF, U+FDF0–U+FFFD: this includes all the other characters in the BMP, excluding ''all'' non-characters (such as surrogates); * U+10000–U+1FFFD, U+20000–U+2FFFD, U+30000–U+3FFFD, U+40000–U+4FFFD, U+50000–U+5FFFD, U+60000–U+6FFFD, U+70000–U+7FFFD, U+80000–U+8FFFD, U+90000–U+9FFFD, U+A0000–U+AFFFD, U+B0000–U+BFFFD, U+C0000–U+CFFFD, U+D0000–U+DFFFD, U+E0000–U+EFFFD, U+F0000–U+FFFFD, U+100000–U+10FFFD: this excludes ''all'' non-characters in supplementary planes.See also
* List of XML and HTML character entity references *References
{{Reflist