XML also provides a mechanism whereby an XML processor can reliably, without any prior knowledge, determine which encoding is being used.
Encodings other than UTF-8 and UTF-16 are not necessarily recognized by every XML parser.
XML provides escape facilities for including characters that are problematic to include directly.
For example: All permitted Unicode characters may be represented with a numeric character reference.
An example is , where the name of the attribute is "number" and its value is "3".The essence of why extensible markup languages are necessary is explained at Markup language (for example, see Markup language § XML) and at Standard Generalized Markup Language.Hundreds of document formats using XML syntax have been developed, including RSS, Atom, SOAP, SVG, and XHTML. are based on XML and the rich features of the XML schema specification.In the case of C1 characters, this restriction is a backwards incompatibility; it was introduced to allow common encoding errors to be detected.The code point U 0000 (Null) is the only character that is not permitted in any XML 1.0 or 1.1 document.An XML attribute can only have a single value and each attribute can appear at most once on each element.In the common situation where a list of multiple values is desired, this must be done by encoding the list into a well-formed XML attribute XML documents consist entirely of characters from the Unicode repertoire.The Unicode character set can be encoded into bytes for storage or transmission in a variety of different ways, called "encodings".Unicode itself defines encodings that cover the entire repertoire; well-known ones include UTF-8 and UTF-16.Except for a small number of specifically excluded control characters, any character defined by Unicode may appear within the content of an XML document.XML includes facilities for identifying the encoding of the Unicode characters that make up the document, and for expressing characters that, for one reason or another, cannot be used directly.