XML.com FAQs > C. Authors of SGML (including writers of HTML: Web page owners)
Question:  C.5 Which parts of an XML document are case-sensitive?

All of it, both markup and text. This is significantly different from HTML and most other SGML applications. It was done to allow markup in non-Latin-alphabet languages and to obviate problems with case-folding in scripts which are caseless.

  • Element type names are case-sensitive: you must stick with whatever combination of upper- or lower-case you use to define them (either by first usage or in a DTD). So you can't say <BODY>...<body>: upper- and lower-case must match; thus <IMG/> and <img/> are two different element types;
  • For well-formed files with no DTD, the first occurrence of an element type name defines the casing;
  • Attribute names are also case-sensitive, on a per-element basis: for example <PIC width="7in"/> and <PIC WIDTH="6in"/> in the same file exhibit two separate attributes, because the different casings of width and WIDTH distinguish them;
  • Attribute values are also case-sensitive. CDATA values (eg HRef="MyFile.SGML") always have been, but ID and IDREF attributes are now case-sensitive as well;
  • All entity names (&Aacute;), and your data content (text), are case-sensitive as always.

This FAQ is from The XML FAQ, maintained by Peter Flynn